]> git.ipfire.org Git - people/ms/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2015 14:59:54 +0000 (06:59 -0800)
commit170f69f4cf0ef0431d52288644108fe09f68e3b8
tree6bd2467f6b0797151f8bfad475c6c8b74e620112
parentf88708af7a43f1765b520f0fd9d8717ce77417e3
sched: Add missing rcu protection to wake_up_all_idle_cpus

commit fd7de1e8d5b2b2b35e71332fafb899f584597150 upstream.

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: f6be8af1c95d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/sched/core.c