From: Ruipeng Qi <ruipengqi7@gmail.com>
To: akpm@linux-foundation.org, peterz@infradead.org,
jpoimboe@kernel.org, mingo@kernel.org
Cc: qiruipeng@lixiang.com, arnd@arndb.de, gpiccoli@igalia.com,
ubizjak@gmail.com, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 7/7] panic: invoke osdump when panic
Date: Thu, 21 Dec 2023 21:39:17 +0800 [thread overview]
Message-ID: <20231221133917.955-1-ruipengqi7@gmail.com> (raw)
From: qiruipeng <qiruipeng@lixiang.com>
Invoke osdump upon a panic to generate a minidump, which can be analyzed
later with the crash utility.
Signed-off-by: qiruipeng <qiruipeng@lixiang.com>
---
kernel/panic.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/panic.c b/kernel/panic.c
index 2807639aab51..b83e5caf8003 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -37,6 +37,9 @@
#include <linux/context_tracking.h>
#include <trace/events/error_report.h>
#include <asm/sections.h>
+#ifdef CONFIG_OS_MINIDUMP
+#include <linux/osdump.h>
+#endif
#define PANIC_TIMER_STEP 100
#define PANIC_BLINK_SPD 18
@@ -326,6 +329,10 @@ void panic(const char *fmt, ...)
} else if (old_cpu != this_cpu)
panic_smp_self_stop();
+#ifdef CONFIG_OS_MINIDUMP
+ osdump();
+#endif
+
console_verbose();
bust_spinlocks(1);
va_start(args, fmt);
--
2.17.1
reply other threads:[~2023-12-21 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20231221133917.955-1-ruipengqi7@gmail.com \
--to=ruipengqi7@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=gpiccoli@igalia.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=qiruipeng@lixiang.com \
--cc=ubizjak@gmail.com \
/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®