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
| ||
|
Date: Fri, 09 Oct 2020 06:35:26 -0000 From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de> To: linux-tip-commits@...r.kernel.org Cc: "Paul E. McKenney" <paulmck@...nel.org>, x86 <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org> Subject: [tip: core/rcu] scftorture: Check unexpected "switch" statement value The following commit has been merged into the core/rcu branch of tip: Commit-ID: de77d4da54d10df97d265e7e99112bfc2fef7d4a Gitweb: https://git.kernel.org/tip/de77d4da54d10df97d265e7e99112bfc2fef7d4a Author: Paul E. McKenney <paulmck@...nel.org> AuthorDate: Thu, 02 Jul 2020 12:15:37 -07:00 Committer: Paul E. McKenney <paulmck@...nel.org> CommitterDate: Mon, 24 Aug 2020 18:38:37 -07:00 scftorture: Check unexpected "switch" statement value This commit adds a "default" case to the switch statement in scftorture_invoke_one() which contains a WARN_ON_ONCE() and an assignment to ->scfc_out to suppress knock-on warnings. These knock-on warnings could otherwise cause the user to think that there was a memory-ordering problem in smp_call_function() instead of a bug in scftorture.c itself. Signed-off-by: Paul E. McKenney <paulmck@...nel.org> --- kernel/scftorture.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 9180de7..d9c01c7 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -357,6 +357,10 @@ static void scftorture_invoke_one(struct scf_statistics *scfp, struct torture_ra } smp_call_function(scf_handler, scfcp, scfsp->scfs_wait); break; + default: + WARN_ON_ONCE(1); + if (scfcp) + scfcp->scfc_out = true; } if (scfcp && scfsp->scfs_wait) { if (WARN_ON_ONCE(!scfcp->scfc_out))
Powered by blists - more mailing lists