From: tip-bot for Mathieu Desnoyers <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: paulmck@linux.vnet.ibm.com, benh@kernel.crashing.org,
mingo@kernel.org, parri.andrea@gmail.com,
torvalds@linux-foundation.org, davejwatson@fb.com, hpa@zytor.com,
maged.michael@gmail.com, ahh@google.com, mpe@ellerman.id.au,
linux-kernel@vger.kernel.org, peterz@infradead.org,
tglx@linutronix.de, paulus@samba.org, boqun.feng@gmail.com,
mathieu.desnoyers@efficios.com, avi@scylladb.com
Subject: [tip:sched/urgent] membarrier: Disable preemption when calling smp_call_function_many()
Date: Tue, 9 Jan 2018 23:54:40 -0800 [thread overview]
Message-ID: <tip-541676078b52f365f53d46ee5517d305cd1b6350@git.kernel.org> (raw)
In-Reply-To: <20171215192310.25293-1-mathieu.desnoyers@efficios.com>
Commit-ID: 541676078b52f365f53d46ee5517d305cd1b6350
Gitweb: https://git.kernel.org/tip/541676078b52f365f53d46ee5517d305cd1b6350
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Fri, 15 Dec 2017 14:23:10 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Jan 2018 08:50:31 +0100
membarrier: Disable preemption when calling smp_call_function_many()
smp_call_function_many() requires disabling preemption around the call.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: <stable@vger.kernel.org> # v4.14+
Cc: Andrea Parri <parri.andrea@gmail.com>
Cc: Andrew Hunter <ahh@google.com>
Cc: Avi Kivity <avi@scylladb.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maged Michael <maged.michael@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171215192310.25293-1-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/membarrier.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c
index dd79087..9bcbacb 100644
--- a/kernel/sched/membarrier.c
+++ b/kernel/sched/membarrier.c
@@ -89,7 +89,9 @@ static int membarrier_private_expedited(void)
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();
prev parent reply other threads:[~2018-01-10 8:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 19:23 [PATCH] Fix: membarrier: add missing preempt off around smp_call_function_many Mathieu Desnoyers
2017-12-20 15:02 ` Mathieu Desnoyers
2018-01-09 23:14 ` Mathieu Desnoyers
2018-01-10 7:43 ` Ingo Molnar
2018-01-10 7:54 ` tip-bot for Mathieu Desnoyers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-541676078b52f365f53d46ee5517d305cd1b6350@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ahh@google.com \
--cc=avi@scylladb.com \
--cc=benh@kernel.crashing.org \
--cc=boqun.feng@gmail.com \
--cc=davejwatson@fb.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maged.michael@gmail.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=parri.andrea@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox