[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250423202620.1686446-1-kevmitch@arista.com>
Date: Wed, 23 Apr 2025 13:26:17 -0700
From: Kevin Mitchell <kevmitch@...sta.com>
To: "Guilherme G . Piccoli" <gpiccoli@...lia.com>
Cc: Kevin Mitchell <kevmitch@...sta.com>,
Petr Mladek <pmladek@...e.com>,
Jani Nikula <jani.nikula@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
John Ogness <john.ogness@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ryo Takakura <takakura@...inux.co.jp>,
Joel Granados <joel.granados@...nel.org>,
Jocelyn Falempe <jfalempe@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
On panic, the backtrace of the panicking CPU will be printed either from
within panic() itself or by the oops handling. Previously, when
PANIC_PRINT_ALL_CPU_BT was enabled, the backtrace of the panicking CPU
would be printed again.
To avoid cluttering up the crash log or console with this redundant
information, this commit omits the panicking CPU from the all-cpu
backtrace printed by panic_printk=PANIC_PRINT_ALL_CPU_BT.
Signed-off-by: Kevin Mitchell <kevmitch@...sta.com>
---
kernel/panic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index a3889f38153d..e53b23449fcf 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -258,7 +258,7 @@ static void panic_other_cpus_shutdown(bool crash_kexec)
if (panic_print & PANIC_PRINT_ALL_CPU_BT) {
/* Temporary allow non-panic CPUs to write their backtraces. */
panic_triggering_all_cpu_backtrace = true;
- trigger_all_cpu_backtrace();
+ trigger_allbutcpu_cpu_backtrace(raw_smp_processor_id());
panic_triggering_all_cpu_backtrace = false;
}
--
2.34.1
Powered by blists - more mailing lists