Skip to content

Commit 097114a

Browse files
daveyoungpmladek
authored andcommitted
print kdump kernel loaded status in stack dump
It is useful to print kdump kernel loaded status in dump_stack() especially when panic happens so that we can differenciate kdump kernel early hang and a normal panic in a bug report. Link: http://lkml.kernel.org/r/[email protected] To: Steven Rostedt <[email protected]> To: Andi Kleen <[email protected]> To: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Dave Young <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
1 parent ab486bc commit 097114a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kernel/printk/printk.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#include <linux/sched/clock.h>
4949
#include <linux/sched/debug.h>
5050
#include <linux/sched/task_stack.h>
51+
#include <linux/kexec.h>
5152

5253
#include <linux/uaccess.h>
5354
#include <asm/sections.h>
@@ -3287,9 +3288,11 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...)
32873288
*/
32883289
void dump_stack_print_info(const char *log_lvl)
32893290
{
3290-
printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
3291+
printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n",
32913292
log_lvl, raw_smp_processor_id(), current->pid, current->comm,
3292-
print_tainted(), init_utsname()->release,
3293+
kexec_crash_loaded() ? "Kdump: loaded " : "",
3294+
print_tainted(),
3295+
init_utsname()->release,
32933296
(int)strcspn(init_utsname()->version, " "),
32943297
init_utsname()->version);
32953298

0 commit comments

Comments
 (0)