From: Bradley Morgan <brads@mainlining.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Petr Mladek <pmladek@suse.com>,
Jinchao Wang <wangjinchao600@gmail.com>,
Craig Lamparter <craig.lamparter@hpe.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>,
linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
Bradley Morgan <brads@mainlining.org>
Subject: [PATCH v7 2/6] panic: flatten nmi_panic control flow
Date: Wed, 16 Sep 2026 18:29:53 +0000 [thread overview]
Message-ID: <20260916182957.7788-3-brads@mainlining.org> (raw)
In-Reply-To: <20260916182957.7788-1-brads@mainlining.org>
panic() is __noreturn, so the else after panic_try_start() is dead.
Drop it so the force_cpu path can be added cleanly on top.
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Bradley Morgan <brads@mainlining.org>
---
kernel/panic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index 08072bfae422..5646d4fb82b7 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -517,7 +517,8 @@ void nmi_panic(struct pt_regs *regs, const char *msg)
{
if (panic_try_start())
panic("%s", msg);
- else if (panic_on_other_cpu())
+
+ if (panic_on_other_cpu())
nmi_panic_self_stop(regs);
}
EXPORT_SYMBOL(nmi_panic);
--
2.47.3
next prev parent reply other threads:[~2026-09-16 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 18:29 [PATCH v7 0/6] panic: fix panic_force_cpu= redirect races and NMI bypass Bradley Morgan
2026-09-16 18:29 ` [PATCH v7 1/6] panic: fix redirect CPU race in panic_try_force_cpu() Bradley Morgan
2026-09-16 18:29 ` Bradley Morgan [this message]
2026-09-16 18:29 ` [PATCH v7 3/6] panic: fix va_list reuse " Bradley Morgan
2026-09-16 18:29 ` [PATCH v7 4/6] panic: restore variable arguments to nmi_panic() Bradley Morgan
2026-09-16 18:29 ` [PATCH v7 5/6] panic: allow force_cpu redirect from an NMI Bradley Morgan
2026-09-16 18:29 ` [PATCH v7 6/6] panic: kill the "buffer unavailable" redirect fallback Bradley Morgan
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=20260916182957.7788-3-brads@mainlining.org \
--to=brads@mainlining.org \
--cc=akpm@linux-foundation.org \
--cc=craig.lamparter@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pmladek@suse.com \
--cc=wangjinchao600@gmail.com \
--cc=wim@linux-watchdog.org \
/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®