]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/stop_machine.c
sched/membarrier: Return -ENOMEM to userspace on memory allocation failure
[linux.git] / kernel / stop_machine.c
index b4f83f7bdf86cdfa21c3d52563a9ad45d37a1164..c7031a22aa7bcb9dfd0f73da764108a321e99442 100644 (file)
@@ -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();