From: Kevin Mitchell <kevmitch@arista.com>
To: "Guilherme G . Piccoli" <gpiccoli@igalia.com>
Cc: Kevin Mitchell <kevmitch@arista.com>,
Petr Mladek <pmladek@suse.com>,
Jani Nikula <jani.nikula@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
John Ogness <john.ogness@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ryo Takakura <takakura@valinux.co.jp>,
Joel Granados <joel.granados@kernel.org>,
Jocelyn Falempe <jfalempe@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] printk/panic: deduplicate backtrace on PANIC_PRINT_ALL_CPU_BT
Date: Wed, 23 Apr 2025 13:26:17 -0700 [thread overview]
Message-ID: <20250423202620.1686446-1-kevmitch@arista.com> (raw)
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@arista.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
next reply other threads:[~2025-04-23 20:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 20:26 Kevin Mitchell [this message]
2025-04-24 9:23 ` Petr Mladek
2025-05-01 21:51 ` Guilherme G. Piccoli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250423202620.1686446-1-kevmitch@arista.com \
--to=kevmitch@arista.com \
--cc=akpm@linux-foundation.org \
--cc=gpiccoli@igalia.com \
--cc=gregkh@linuxfoundation.org \
--cc=jani.nikula@intel.com \
--cc=jfalempe@redhat.com \
--cc=joel.granados@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=takakura@valinux.co.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®