]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:18:03 +0000 (13:18 -0700)
commit7607da8d4639cea9d7282c00e4fc1b288fcaa90f
tree0d8560d1b207cf5a305b4d33889d1bdf9fabd8db
parentc8035d9f08c1c8bbfe04576dbebe5c6da5621dae
sched: Fix race between ttwu() and task_rq_lock()

commit 0970d2992dfd7d5ec2c787417cf464f01eeaf42a upstream

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>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/sched.c