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>] [day] [month] [year] [list]
Date:   Fri, 16 Feb 2018 02:51:27 -0800
From:   tip-bot for Michael Kelley <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mhkelley@...look.com, torvalds@...ux-foundation.org,
        mingo@...nel.org, fengguang.wu@...el.com, peterz@...radead.org,
        hpa@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [tip:core/urgent] cpumask: Make for_each_cpu_wrap() available on UP
 as well

Commit-ID:  d207af2eab3f8668b95ad02b21930481c42806fd
Gitweb:     https://git.kernel.org/tip/d207af2eab3f8668b95ad02b21930481c42806fd
Author:     Michael Kelley <mhkelley@...look.com>
AuthorDate: Wed, 14 Feb 2018 02:54:03 +0000
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Fri, 16 Feb 2018 10:40:24 +0100

cpumask: Make for_each_cpu_wrap() available on UP as well

for_each_cpu_wrap() was originally added in the #else half of a
large "#if NR_CPUS == 1" statement, but was omitted in the #if
half.  This patch adds the missing #if half to prevent compile
errors when NR_CPUS is 1.

Reported-by: kbuild test robot <fengguang.wu@...el.com>
Signed-off-by: Michael Kelley <mhkelley@...look.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: kys@...rosoft.com
Cc: martin.petersen@...cle.com
Cc: mikelley@...rosoft.com
Fixes: c743f0a5c50f ("sched/fair, cpumask: Export for_each_cpu_wrap()")
Link: http://lkml.kernel.org/r/SN6PR1901MB2045F087F59450507D4FCC17CBF50@SN6PR1901MB2045.namprd19.prod.outlook.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 include/linux/cpumask.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index d4a2a7d..bf53d89 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -170,6 +170,8 @@ static inline unsigned int cpumask_local_spread(unsigned int i, int node)
 	for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
 #define for_each_cpu_not(cpu, mask)		\
 	for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
+#define for_each_cpu_wrap(cpu, mask, start)	\
+	for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)(start))
 #define for_each_cpu_and(cpu, mask, and)	\
 	for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
 #else

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ