linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] panic: remove redundant panic-cpu backtrace
@ 2025-07-31  3:02 Sergey Senozhatsky
  2025-07-31  7:09 ` John Ogness
  0 siblings, 1 reply; 7+ messages in thread
From: Sergey Senozhatsky @ 2025-07-31  3:02 UTC (permalink / raw)
  To: Andrew Morton, Petr Mladek
  Cc: Feng Tang, John Ogness, linux-kernel, Sergey Senozhatsky

SYS_INFO_ALL_CPU_BT sends NMI backtrace request to
all CPUs, which dumps an extra backtrace on panic CPU.
Exclude panic CPU from SYS_INFO_ALL_CPU_BT cpu-mask.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
 kernel/panic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 27747cecb1af..c08f2695cf42 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -335,9 +335,11 @@ void check_panic_on_warn(const char *origin)
 static void panic_other_cpus_shutdown(bool crash_kexec)
 {
 	if (panic_print & SYS_INFO_ALL_CPU_BT) {
+		unsigned int this_cpu = raw_smp_processor_id();
+
 		/* Temporary allow non-panic CPUs to write their backtraces. */
 		panic_triggering_all_cpu_backtrace = true;
-		trigger_all_cpu_backtrace();
+		trigger_allbutcpu_cpu_backtrace(this_cpu);
 		panic_triggering_all_cpu_backtrace = false;
 	}
 
-- 
2.50.1.565.gc32cd1483b-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-13  6:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31  3:02 [PATCH] panic: remove redundant panic-cpu backtrace Sergey Senozhatsky
2025-07-31  7:09 ` John Ogness
2025-07-31  7:32   ` Sergey Senozhatsky
2025-07-31  7:45     ` John Ogness
2025-07-31  9:51       ` Sergey Senozhatsky
2025-08-12 13:03       ` Petr Mladek
2025-08-13  6:36         ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).