Oleg Nesterov 6a1bdc1b57 sched: _cpu_down(): Don't play with current->cpus_allowed
_cpu_down() changes the current task's affinity and then recovers it at
the end. The problems are well known: we can't restore old_allowed if it
was bound to the now-dead-cpu, and we can race with the userspace which
can change cpu-affinity during unplug.

_cpu_down() should not play with current->cpus_allowed at all. Instead,
take_cpu_down() can migrate the caller of _cpu_down() after __cpu_disable()
removes the dying cpu from cpu_online_mask.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100315091023.GA9148@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-04-02 20:12:03 +02:00
..
2009-09-21 14:29:21 +02:00
2010-04-02 20:03:08 +02:00
2010-03-03 14:07:57 -05:00
2009-06-24 00:02:38 -04:00
2010-03-24 16:31:19 -07:00
2010-04-02 20:12:00 +02:00
2009-09-18 09:48:52 -07:00
2010-04-02 20:12:00 +02:00
2009-06-16 19:47:48 -07:00
2009-12-14 23:55:34 +01:00
2009-07-24 10:53:29 +02:00
2009-01-14 18:09:02 +01:00
2010-03-12 15:52:40 -08:00
2010-02-10 17:47:17 -08:00
2010-03-06 11:26:32 -08:00
2010-03-06 11:26:33 -08:00
2010-03-12 15:52:32 -08:00
2010-03-12 15:52:32 -08:00
2010-03-12 15:53:10 -08:00
2010-02-18 14:30:18 -08:00
2009-12-22 14:10:37 -08:00
2010-03-06 11:26:23 -08:00
2009-09-23 18:13:10 -07:00
2010-04-02 20:12:00 +02:00
2009-06-18 13:03:55 -07:00