]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Add missing rcu protection to wake_up_all_idle_cpus
authorAndy Lutomirski <luto@amacapital.net>
Sat, 29 Nov 2014 16:13:51 +0000 (08:13 -0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 8 Dec 2014 10:44:19 +0000 (11:44 +0100)
commita97ba98c6d0ef58e91077542eeb84ce3c7f7bad0
tree7b0ff7aad0d8c984748557dfec52fad02b54a045
parent39bbc1ac39a9ec48f6a0c1c6c6ed27e7691e0a75
sched: Add missing rcu protection to wake_up_all_idle_cpus

Locklessly doing is_idle_task(rq->curr) is only okay because of
RCU protection.  The older variant of the broken code checked
rq->curr == rq->idle instead and therefore didn't need RCU.

Fixes: 7011431f53b2 ("sched: Add new API wake_up_if_idle() to wake up the idle cpu")
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Chuansheng Liu <chuansheng.liu@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/729365dddca178506dfd0a9451006344cd6808bc.1417277372.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c