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] [thread-next>] [day] [month] [year] [list]
Message-ID: <158125695732.26104.1145889078762434274.tglx@nanos.tec.linutronix.de>
Date:   Sun, 09 Feb 2020 14:02:37 -0000
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [GIT pull] SMP fixes for 5.6-rc1

Linus,

please pull the latest smp/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp-urgent-2020-02-09

up to:  1e474b28e788: smp/up: Make smp_call_function_single() match SMP semantics


Two fixes for the SMP related functionality:

 - Make the UP version of smp_call_function_single() match SMP semantics
   when called for a not available CPU.  Instead of emitting a warning and
   assuming that the function call target is CPU0, return a proper error
   code like the SMP version does.

 - Remove a superfluous check in smp_call_function_many_cond()

Thanks,

	tglx

------------------>
Paul E. McKenney (1):
      smp/up: Make smp_call_function_single() match SMP semantics

Sebastian Andrzej Siewior (1):
      smp: Remove superfluous cond_func check in smp_call_function_many_cond()


 kernel/smp.c | 2 +-
 kernel/up.c  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index 3b7bedc97af3..d0ada39eb4d4 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -435,7 +435,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask,
 
 	/* Fastpath: do that cpu by itself. */
 	if (next_cpu >= nr_cpu_ids) {
-		if (!cond_func || (cond_func && cond_func(cpu, info)))
+		if (!cond_func || cond_func(cpu, info))
 			smp_call_function_single(cpu, func, info, wait);
 		return;
 	}
diff --git a/kernel/up.c b/kernel/up.c
index 53144d056252..c6f323dcd45b 100644
--- a/kernel/up.c
+++ b/kernel/up.c
@@ -14,7 +14,8 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
 {
 	unsigned long flags;
 
-	WARN_ON(cpu != 0);
+	if (cpu != 0)
+		return -ENXIO;
 
 	local_irq_save(flags);
 	func(info);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ