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]
Message-ID: <20260118120149.986849-1-pnina.feder@mobileye.com>
Date: Sun, 18 Jan 2026 14:01:49 +0200
From: Pnina Feder <pnina.feder@...ileye.com>
To: akpm@...ux-foundation.org
Cc: pmladek@...e.com,
	bhe@...hat.com,
	linux-kernel@...r.kernel.org,
	lkp@...el.com,
	mgorman@...e.de,
	mingo@...hat.com,
	peterz@...radead.org,
	pnina.feder@...ileye.com,
	rostedt@...dmis.org,
	senozhatsky@...omium.org,
	tglx@...utronix.de,
	vkondra@...ileye.com
Subject: [PATCH v1] panic: add panic_redirect_cpu declaration to header

Add the extern declaration for panic_redirect_cpu to linux/panic.h
to fix the sparse warning:

  kernel/panic.c:305:10: sparse: sparse: symbol 'panic_redirect_cpu'
  was not declared. Should it be static?

The variable needs to be declared in the header alongside panic_cpu
since it is used for synchronization when redirecting panic to a
specific CPU via the panic_force_cpu= boot parameter.

Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202601161825.pUmb6FsK-lkp@intel.com/
Signed-off-by: Pnina Feder <pnina.feder@...ileye.com>
---
 include/linux/panic.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/panic.h b/include/linux/panic.h
index a00bc0937698..f1dd417e54b2 100644
--- a/include/linux/panic.h
+++ b/include/linux/panic.h
@@ -41,6 +41,14 @@ void abort(void);
  * PANIC_CPU_INVALID means no CPU has entered panic() or crash_kexec().
  */
 extern atomic_t panic_cpu;
+
+/*
+ * panic_redirect_cpu is used when panic is redirected to a specific CPU via
+ * the panic_force_cpu= boot parameter. It holds the CPU number that originally
+ * triggered the panic before redirection. A value of PANIC_CPU_INVALID means
+ * no redirection has occurred.
+ */
+extern atomic_t panic_redirect_cpu;
 #define PANIC_CPU_INVALID	-1
 
 bool panic_try_start(void);
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ