]> Pileus Git - ~andy/linux/commit
stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 28 Feb 2014 12:39:05 +0000 (13:39 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 11 Mar 2014 10:33:47 +0000 (11:33 +0100)
commit177c53d943368fc97644ebc0a250dc8e2d124250
treeb36cfaeb80c11a76daea39f9613c21e2348816a1
parentd44753b843e093f9e1f2f14806fbe106fff74898
stop_machine: Fix^2 race between stop_two_cpus() and stop_cpus()

We must use smp_call_function_single(.wait=1) for the
irq_cpu_stop_queue_work() to ensure the queueing is actually done under
stop_cpus_lock. Without this we could have dropped the lock by the time
we do the queueing and get the race we tried to fix.

Fixes: 7053ea1a34fa ("stop_machine: Fix race between stop_two_cpus() and stop_cpus()")
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20140228123905.GK3104@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/stop_machine.c