[Devel] [PATCH] sched: CPU hotplug race vs. set_cpus_allowed()

Kirill Korotaev dev at sw.ru
Mon Jun 26 00:58:49 PDT 2006


There is a race between set_cpus_allowed()
and move_task_off_dead_cpu().
__migrate_task() doesn't report any err code, so
task can be left on its runqueue if its cpus_allowed mask
changed so that dest_cpu is not longer a possible target.
Also, chaning cpus_allowed mask requires rq->lock being held.

Changes from original post according to to Con Colivas notes:
- added comment
- cleanup code a bit

Signed-Off-By: Kirill Korotaev <dev at openvz.org>
Acked-By: Ingo Molnar <mingo at elte.hu>

Kirill
P.S. against 2.6.17-mm1
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff-migrate-task
URL: <http://lists.openvz.org/pipermail/devel/attachments/20060626/3cb0df80/attachment-0001.ksh>


More information about the Devel mailing list