Skip to contentSkip to conversation

panic: invoke osdump when panic

RFC PATCH NAK Ruipeng Qi 1 participant 1 message Dec 21, 2023

lore
Share & tools
lore

Ruipeng Qi

author
#0 lore raw

RFC PATCH 7/7 panic: invoke osdump when panic

From: qiruipeng <[email protected]>

Invoke osdump upon a panic to generate a minidump, which can be analyzed later with the crash utility.

---
 kernel/panic.c | 7 +++++++
 1 file changed, 7 insertions(+)
kernel/panic.c +7 -0
index 2807639aab51..b83e5caf8003 100644
@@ -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);
Signature · 1 line
2.17.1