aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-11-17 14:06:20 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-11-17 17:40:33 -0800
commit9398180097e359646d46083c3e079a54e20bee82 (patch)
tree633933ddd86e3dba7c0970eea5768867849842c9 /mm
parentmm/memory_hotplug: fix section mismatch (diff)
downloadlinux-dev-9398180097e359646d46083c3e079a54e20bee82.tar.xz
linux-dev-9398180097e359646d46083c3e079a54e20bee82.zip
workqueue: fix race condition in schedule_on_each_cpu()
Commit 65a64464349883891e21e74af16c05d6e1eeb4e9 ("HWPOISON: Allow schedule_on_each_cpu() from keventd") which allows schedule_on_each_cpu() to be called from keventd added a race condition. schedule_on_each_cpu() may race with cpu hotplug and end up executing the function twice on a cpu. Fix it by moving direct execution into the section protected with get/put_online_cpus(). While at it, update code such that direct execution is done after works have been scheduled for all other cpus and drop unnecessary cpu != orig test from flush loop. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions