aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2018-01-26 23:11:29 -0500
committerPetr Mladek <pmladek@suse.com>2018-02-08 08:47:25 -0500
commit097114aa6eb2aa206c8cf136de77ebffe424234c (patch)
tree4edbef479758ff191461e1f5ac218bdbf217bea4
parentab486bc9a591689f3ac2b6ebc072309371f8f451 (diff)
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/20180127041129.GA29016@dhcp-128-65.nay.redhat.com To: Steven Rostedt <rostedt@goodmis.org> To: Andi Kleen <ak@linux.intel.com> To: kexec@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org Cc: kexec@lists.infradead.org Signed-off-by: Dave Young <dyoung@redhat.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Petr Mladek <pmladek@suse.com>
-rw-r--r--kernel/printk/printk.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index db4b9b8929eb..fa3de5f10e0e 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -48,6 +48,7 @@
48#include <linux/sched/clock.h> 48#include <linux/sched/clock.h>
49#include <linux/sched/debug.h> 49#include <linux/sched/debug.h>
50#include <linux/sched/task_stack.h> 50#include <linux/sched/task_stack.h>
51#include <linux/kexec.h>
51 52
52#include <linux/uaccess.h> 53#include <linux/uaccess.h>
53#include <asm/sections.h> 54#include <asm/sections.h>
@@ -3287,9 +3288,11 @@ void __init dump_stack_set_arch_desc(const char *fmt, ...)
3287 */ 3288 */
3288void dump_stack_print_info(const char *log_lvl) 3289void dump_stack_print_info(const char *log_lvl)
3289{ 3290{
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",
3291 log_lvl, raw_smp_processor_id(), current->pid, current->comm, 3292 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,
3293 (int)strcspn(init_utsname()->version, " "), 3296 (int)strcspn(init_utsname()->version, " "),
3294 init_utsname()->version); 3297 init_utsname()->version);
3295 3298