Skip to content

Commit

Permalink
print kdump kernel loaded status in stack dump
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
daveyoung authored and pmladek committed Feb 8, 2018
1 parent ab486bc commit 097114a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <linux/sched/clock.h>
#include <linux/sched/debug.h>
#include <linux/sched/task_stack.h>
#include <linux/kexec.h>

#include <linux/uaccess.h>
#include <asm/sections.h>
Expand Down Expand Up @@ -3287,9 +3288,11 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...)
*/
void dump_stack_print_info(const char *log_lvl)
{
printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n",
printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n",
log_lvl, raw_smp_processor_id(), current->pid, current->comm,
print_tainted(), init_utsname()->release,
kexec_crash_loaded() ? "Kdump: loaded " : "",
print_tainted(),
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);

Expand Down

0 comments on commit 097114a

Please sign in to comment.