Re: [PATCH] task containersv11 add tasks file interface fix for cpusets

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Saturday, October 6, 2007 - 11:15 pm

On Sat, 6 Oct 2007, Paul Menage wrote:


It can race with sched_setaffinity().  It has to give up tasklist_lock as 
well to call set_cpus_allowed() and can race

	cpus_allowed = cpuset_cpus_allowed(p);
	cpus_and(new_mask, new_mask, cpus_allowed);
	retval = set_cpus_allowed(p, new_mask);

and allow a task to have a cpu outside of the cpuset's new cpus_allowed if 
you've taken it away between cpuset_cpus_allowed() and set_cpus_allowed().

		David
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] task containersv11 add tasks file interface fi ..., David Rientjes, (Sat Oct 6, 11:15 pm)
Re: [PATCH] task containersv11 add tasks file interface fi ..., Eric W. Biederman, (Thu Oct 11, 4:20 pm)