diff options
author | Peter Zijlstra <peterz@infradead.org> | 2019-05-29 20:36:37 +0000 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2019-08-08 09:09:30 +0200 |
commit | 99d84bf8c65a7a0dbc9e166ca0a58ed949ac4f37 (patch) | |
tree | b4d938b98e1054a8af192b20ebc2df00359008ca /kernel/stop_machine.c | |
parent | de53fd7aedb100f03e5d2231cfce0e4993282425 (diff) | |
download | linux-99d84bf8c65a7a0dbc9e166ca0a58ed949ac4f37.tar.bz2 |
stop_machine: Fix stop_cpus_in_progress ordering
Make sure the entire for loop has stop_cpus_in_progress set.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Aaron Lu <aaron.lwe@gmail.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: mingo@kernel.org
Cc: Phil Auld <pauld@redhat.com>
Cc: Julien Desfossez <jdesfossez@digitalocean.com>
Cc: Nishanth Aravamudan <naravamudan@digitalocean.com>
Link: https://lkml.kernel.org/r/0fd8fd4b99b9b9aa88d8b2dff897f7fd0d88f72c.1559129225.git.vpillai@digitalocean.com
Diffstat (limited to 'kernel/stop_machine.c')
-rw-r--r-- | kernel/stop_machine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index b4f83f7bdf86..c7031a22aa7b 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -383,6 +383,7 @@ static bool queue_stop_cpus_work(const struct cpumask *cpumask, */ preempt_disable(); stop_cpus_in_progress = true; + barrier(); for_each_cpu(cpu, cpumask) { work = &per_cpu(cpu_stopper.stop_work, cpu); work->fn = fn; @@ -391,6 +392,7 @@ static bool queue_stop_cpus_work(const struct cpumask *cpumask, if (cpu_stop_queue_work(cpu, work)) queued = true; } + barrier(); stop_cpus_in_progress = false; preempt_enable(); |