[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1396790368.40028.1513782176011.JavaMail.zimbra@efficios.com>
Date: Wed, 20 Dec 2017 15:02:56 +0000 (UTC)
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Boqun Feng <boqun.feng@...il.com>,
Andrew Hunter <ahh@...gle.com>,
maged michael <maged.michael@...il.com>,
Avi Kivity <avi@...lladb.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Dave Watson <davejwatson@...com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andrea Parri <parri.andrea@...il.com>,
stable <stable@...r.kernel.org>
Subject: Re: [PATCH] Fix: membarrier: add missing preempt off around
smp_call_function_many
Hi Linus, Peter, Ingo,
Now that membarrier.c has been moved from kernel/ to kernel/sched/, should
I route this membarrier fix through the scheduler maintainers, or is it OK
to send it to you directly ?
Thanks,
Mathieu
----- On Dec 15, 2017, at 2:23 PM, Mathieu Desnoyers mathieu.desnoyers@...icios.com wrote:
> smp_call_function_many requires disabling preemption around the call.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> CC: Linus Torvalds <torvalds@...ux-foundation.org>
> CC: Peter Zijlstra <peterz@...radead.org>
> CC: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> CC: Boqun Feng <boqun.feng@...il.com>
> CC: Andrew Hunter <ahh@...gle.com>
> CC: Maged Michael <maged.michael@...il.com>
> CC: Avi Kivity <avi@...lladb.com>
> CC: Benjamin Herrenschmidt <benh@...nel.crashing.org>
> CC: Paul Mackerras <paulus@...ba.org>
> CC: Michael Ellerman <mpe@...erman.id.au>
> CC: Dave Watson <davejwatson@...com>
> CC: Thomas Gleixner <tglx@...utronix.de>
> CC: Ingo Molnar <mingo@...hat.com>
> CC: "H. Peter Anvin" <hpa@...or.com>
> CC: Andrea Parri <parri.andrea@...il.com>
> CC: <stable@...r.kernel.org> # v4.14
> ---
> kernel/sched/membarrier.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/sched/membarrier.c b/kernel/sched/membarrier.c
> index dd7908743dab..9bcbacba82a8 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();
> --
> 2.11.0
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Powered by blists - more mailing lists