From: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
To: linux-kernel@vger.kernel.org
Cc: Wei Liu <wei.liu@kernel.org>,
linux-hyperv@vger.kernel.org, Dexuan Cui <decui@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>,
Petr Mladek <pmladek@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jani Nikula <jani.nikula@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
John Ogness <john.ogness@linutronix.de>,
Baoquan He <bhe@redhat.com>,
Joel Granados <joel.granados@kernel.org>,
Jocelyn Falempe <jfalempe@redhat.com>,
Ryo Takakura <takakura@valinux.co.jp>
Subject: [PATCH RFC] panic: call panic handlers before panic_other_cpus_shutdown()
Date: Thu, 20 Feb 2025 17:53:00 -0500 [thread overview]
Message-ID: <20250220225302.195282-1-hamzamahfooz@linux.microsoft.com> (raw)
Since, the panic handlers may require certain cpus to be online to panic
gracefully, we should call them before turning off SMP. Without this
re-ordering, on Hyper-V hv_panic_vmbus_unload() times out, because the
vmbus channel is bound to VMBUS_CONNECT_CPU and unless the crashing cpu
is the same as VMBUS_CONNECT_CPU, VMBUS_CONNECT_CPU will be offlined by
crash_smp_send_stop() before the vmbus channel can be deconstructed.
Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
---
kernel/panic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index fbc59b3b64d0..9712a46dfe27 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -372,8 +372,6 @@ void panic(const char *fmt, ...)
if (!_crash_kexec_post_notifiers)
__crash_kexec(NULL);
- panic_other_cpus_shutdown(_crash_kexec_post_notifiers);
-
printk_legacy_allow_panic_sync();
/*
@@ -382,6 +380,8 @@ void panic(const char *fmt, ...)
*/
atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
+ panic_other_cpus_shutdown(_crash_kexec_post_notifiers);
+
panic_print_sys_info(false);
kmsg_dump_desc(KMSG_DUMP_PANIC, buf);
--
2.47.1
next reply other threads:[~2025-02-20 22:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 22:53 Hamza Mahfooz [this message]
2025-02-21 2:23 ` [PATCH RFC] panic: call panic handlers before panic_other_cpus_shutdown() Ryo Takakura
2025-02-21 21:23 ` Hamza Mahfooz
2025-02-22 5:44 ` Ryo Takakura
2025-02-26 15:49 ` Petr Mladek
2025-03-02 6:36 ` Ryo Takakura
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=20250220225302.195282-1-hamzamahfooz@linux.microsoft.com \
--to=hamzamahfooz@linux.microsoft.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=decui@microsoft.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=jani.nikula@intel.com \
--cc=jfalempe@redhat.com \
--cc=joel.granados@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=takakura@valinux.co.jp \
--cc=wei.liu@kernel.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;
as well as URLs for NNTP newsgroup(s).