sched: Fix sched_exec() balancing
commit31a9936c6fc4dafede228a762e3ebf22d6f4ae3c
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 16 Dec 2009 17:04:37 +0000 (16 18:04 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:18:01 +0000 (20 13:18 -0700)
tree573ef4e4195b0c12ef2f397e8eb1c7b4ede1614d
parent9f2243e5817e778ebb95101722492937b845d8c9
sched: Fix sched_exec() balancing

commit 3802290628348674985d14914f9bfee7b9084548 upstream

sched: Fix sched_exec() balancing

Since we access ->cpus_allowed without holding rq->lock we need
a retry loop to validate the result, this comes for near free
when we merge sched_migrate_task() into sched_exec() since that
already does the needed check.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091216170517.884743662@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/sched.c