diff options
author | Adrien Schildknecht <adrien+dev@schischi.me> | 2015-02-19 21:34:21 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2015-02-23 12:34:42 -0500 |
commit | 1fc7f61c3e604f6bf778b5c6afc2715d79ab7f36 (patch) | |
tree | 22846e0dfc2a9922d8967cef5c50bbaf4a3d2832 /arch/x86/kernel/dumpstack.c | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
x86/kernel: Fix output of show_stack_log_lvl()
show_stack_log_lvl() does not set the log level after a new line, the
following messages printed with pr_cont() are thus assigned to the
default log level.
This patch prepends the log level to the next message following a new
line.
print_trace_address() uses printk(log_lvl). Using printk() with just
a log level is ignored and thus has no effect on the next pr_cont().
We need to prepend the log level directly into the message.
Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1424399661-20327-1-git-send-email-adrien+dev@schischi.me
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/kernel/dumpstack.c')
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index cf3df1d8d039..81b3932edbdc 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -25,10 +25,12 @@ unsigned int code_bytes = 64; | |||
25 | int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE; | 25 | int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE; |
26 | static int die_counter; | 26 | static int die_counter; |
27 | 27 | ||
28 | static void printk_stack_address(unsigned long address, int reliable) | 28 | static void printk_stack_address(unsigned long address, int reliable, |
29 | void *data) | ||
29 | { | 30 | { |
30 | pr_cont(" [<%p>] %s%pB\n", | 31 | printk("%s [<%p>] %s%pB\n", |
31 | (void *)address, reliable ? "" : "? ", (void *)address); | 32 | (char *)data, (void *)address, reliable ? "" : "? ", |
33 | (void *)address); | ||
32 | } | 34 | } |
33 | 35 | ||
34 | void printk_address(unsigned long address) | 36 | void printk_address(unsigned long address) |
@@ -155,8 +157,7 @@ static int print_trace_stack(void *data, char *name) | |||
155 | static void print_trace_address(void *data, unsigned long addr, int reliable) | 157 | static void print_trace_address(void *data, unsigned long addr, int reliable) |
156 | { | 158 | { |
157 | touch_nmi_watchdog(); | 159 | touch_nmi_watchdog(); |
158 | printk(data); | 160 | printk_stack_address(addr, reliable, data); |
159 | printk_stack_address(addr, reliable); | ||
160 | } | 161 | } |
161 | 162 | ||
162 | static const struct stacktrace_ops print_trace_ops = { | 163 | static const struct stacktrace_ops print_trace_ops = { |