Skip to content

Commit 5416760

Browse files
compudjIngo Molnar
authored andcommitted
membarrier: Disable preemption when calling smp_call_function_many()
smp_call_function_many() requires disabling preemption around the call. Signed-off-by: Mathieu Desnoyers <[email protected]> Cc: <[email protected]> # v4.14+ Cc: Andrea Parri <[email protected]> Cc: Andrew Hunter <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Dave Watson <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Maged Michael <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Paul E . McKenney <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 414a2dc commit 5416760

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/sched/membarrier.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ static int membarrier_private_expedited(void)
8989
rcu_read_unlock();
9090
}
9191
if (!fallback) {
92+
preempt_disable();
9293
smp_call_function_many(tmpmask, ipi_mb, NULL, 1);
94+
preempt_enable();
9395
free_cpumask_var(tmpmask);
9496
}
9597
cpus_read_unlock();

0 commit comments

Comments
 (0)