sched: Fix race between ttwu() and task_rq_lock()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 15 Feb 2010 13:45:54 +0000 (14:45 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 16 Feb 2010 14:13:59 +0000 (15:13 +0100)
Thomas found that due to ttwu() changing a task's cpu without holding
the rq->lock, task_rq_lock() might end up locking the wrong rq.

Avoid this by serializing against TASK_WAKING.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1266241712.15770.420.camel@laptop>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched.c

diff --cc kernel/sched.c
Simple merge