diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c index 9d8df34bea75..16f57e71f9c4 100644 --- a/kernel/sched/membarrier.c +++ b/kernel/sched/membarrier.c @@ -332,9 +332,7 @@ static int sync_runqueues_membarrier_state(struct mm_struct *mm) } rcu_read_unlock(); - preempt_disable(); - smp_call_function_many(tmpmask, ipi_sync_rq_state, mm, 1); - preempt_enable(); + on_each_cpu_mask(tmpmask, ipi_sync_rq_state, mm, true); free_cpumask_var(tmpmask); cpus_read_unlock();