* [RFC PATCH 7/7] panic: invoke osdump when panic
@ 2023-12-21 13:39 Ruipeng Qi
0 siblings, 0 replies; only message in thread
From: Ruipeng Qi @ 2023-12-21 13:39 UTC (permalink / raw)
To: akpm, peterz, jpoimboe, mingo
Cc: qiruipeng, arnd, gpiccoli, ubizjak, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-21 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21 13:39 [RFC PATCH 7/7] panic: invoke osdump when panic Ruipeng Qi
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®