Skip to contentSkip to conversation

Patch "membarrier: Disable preemption when calling smp_call_function_many()" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Jan 13, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

membarrier: Disable preemption when calling smp_call_function_many()

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
membarrier-disable-preemption-when-calling-smp_call_function_many.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 541676078b52f365f53d46ee5517d305cd1b6350 Mon Sep 17 00:00:00 2001

From: Mathieu Desnoyers <[email protected]>
Date: Fri, 15 Dec 2017 14:23:10 -0500
Subject: membarrier: Disable preemption when calling smp_call_function_many()

From: Mathieu Desnoyers <[email protected]>

commit 541676078b52f365f53d46ee5517d305cd1b6350 upstream.

smp_call_function_many() requires disabling preemption around the call.

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]>
---
 kernel/sched/membarrier.c |    2 ++
 1 file changed, 2 insertions(+)
kernel/sched/membarrier.c +2 -0
@@ -89,7 +89,9 @@ static int membarrier_private_expedited(
 		rcu_read_unlock();
 	}
 	if (!fallback) {
+		preempt_disable();
 		smp_call_function_many(tmpmask, ipi_mb, NULL, 1);
+		preempt_enable();
 		free_cpumask_var(tmpmask);
 	}
 	cpus_read_unlock();

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/membarrier-disable-preemption-when-calling-smp_call_function_many.patch queue-4.14/kvm-fix-stack-out-of-bounds-read-in-write_mmio.patch