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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260126122618.2967950-1-pnina.feder@mobileye.com>
Date: Mon, 26 Jan 2026 14:26:18 +0200
From: Pnina Feder <pnina.feder@...ileye.com>
To: pnina.feder@...ileye.com
Cc: akpm@...ux-foundation.org,
	bhe@...hat.com,
	linux-kernel@...r.kernel.org,
	lkp@...el.com,
	mgorman@...e.de,
	mingo@...hat.com,
	peterz@...radead.org,
	pmladek@...e.com,
	rostedt@...dmis.org,
	senozhatsky@...omium.org,
	tglx@...utronix.de,
	vkondra@...ileye.com
Subject: [PATCH] panic: fix unused variable warning when SMP or CRASH_DUMP disabled

Fix for pending patch:
"panic: add panic_force_cpu= parameter to redirect panic to a specific CPU"

Move panic_force_buf inside the #ifdef block to fix unused variable
warning when CONFIG_SMP or CONFIG_CRASH_DUMP is not enabled.

Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601222042.OSZryOnl-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202601230908.0vB3SoHM-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202601231058.Q6hDGfoT-lkp@intel.com/
Signed-off-by: Pnina Feder <pnina.feder@...ileye.com>
---
 kernel/panic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 970b7dd7b4c5..ee408ca76211 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -76,7 +76,6 @@ EXPORT_SYMBOL_GPL(panic_timeout);
 unsigned long panic_print;
 
 static int panic_force_cpu = -1;
-static char *panic_force_buf;
 
 ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
 
@@ -306,6 +305,8 @@ atomic_t panic_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
 atomic_t panic_redirect_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
 
 #if defined(CONFIG_SMP) && defined(CONFIG_CRASH_DUMP)
+static char *panic_force_buf;
+
 static int __init panic_force_cpu_setup(char *str)
 {
 	int cpu;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ