lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 9 Jan 2018 23:54:40 -0800
From:   tip-bot for Mathieu Desnoyers <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     paulmck@...ux.vnet.ibm.com, benh@...nel.crashing.org,
        mingo@...nel.org, parri.andrea@...il.com,
        torvalds@...ux-foundation.org, davejwatson@...com, hpa@...or.com,
        maged.michael@...il.com, ahh@...gle.com, mpe@...erman.id.au,
        linux-kernel@...r.kernel.org, peterz@...radead.org,
        tglx@...utronix.de, paulus@...ba.org, boqun.feng@...il.com,
        mathieu.desnoyers@...icios.com, avi@...lladb.com
Subject: [tip:sched/urgent] membarrier: Disable preemption when calling
 smp_call_function_many()

Commit-ID:  541676078b52f365f53d46ee5517d305cd1b6350
Gitweb:     https://git.kernel.org/tip/541676078b52f365f53d46ee5517d305cd1b6350
Author:     Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
AuthorDate: Fri, 15 Dec 2017 14:23:10 -0500
Committer:  Ingo Molnar <mingo@...nel.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@...icios.com>
Cc: <stable@...r.kernel.org> # v4.14+
Cc: Andrea Parri <parri.andrea@...il.com>
Cc: Andrew Hunter <ahh@...gle.com>
Cc: Avi Kivity <avi@...lladb.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: Dave Watson <davejwatson@...com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Maged Michael <maged.michael@...il.com>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Paul E . McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20171215192310.25293-1-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@...nel.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();

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ