diff options
Diffstat (limited to 'arch/x86/kernel/dumpstack.c')
-rw-r--r-- | arch/x86/kernel/dumpstack.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index deb6421c9e69..d9c12d3022a7 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -25,12 +25,17 @@ 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 | void printk_address(unsigned long address, int reliable) | 28 | static void printk_stack_address(unsigned long address, int reliable) |
29 | { | 29 | { |
30 | pr_cont(" [<%p>] %s%pB\n", | 30 | pr_cont(" [<%p>] %s%pB\n", |
31 | (void *)address, reliable ? "" : "? ", (void *)address); | 31 | (void *)address, reliable ? "" : "? ", (void *)address); |
32 | } | 32 | } |
33 | 33 | ||
34 | void printk_address(unsigned long address) | ||
35 | { | ||
36 | pr_cont(" [<%p>] %pS\n", (void *)address, (void *)address); | ||
37 | } | ||
38 | |||
34 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 39 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
35 | static void | 40 | static void |
36 | print_ftrace_graph_addr(unsigned long addr, void *data, | 41 | print_ftrace_graph_addr(unsigned long addr, void *data, |
@@ -151,7 +156,7 @@ static void print_trace_address(void *data, unsigned long addr, int reliable) | |||
151 | { | 156 | { |
152 | touch_nmi_watchdog(); | 157 | touch_nmi_watchdog(); |
153 | printk(data); | 158 | printk(data); |
154 | printk_address(addr, reliable); | 159 | printk_stack_address(addr, reliable); |
155 | } | 160 | } |
156 | 161 | ||
157 | static const struct stacktrace_ops print_trace_ops = { | 162 | static const struct stacktrace_ops print_trace_ops = { |
@@ -281,7 +286,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) | |||
281 | #else | 286 | #else |
282 | /* Executive summary in case the oops scrolled away */ | 287 | /* Executive summary in case the oops scrolled away */ |
283 | printk(KERN_ALERT "RIP "); | 288 | printk(KERN_ALERT "RIP "); |
284 | printk_address(regs->ip, 1); | 289 | printk_address(regs->ip); |
285 | printk(" RSP <%016lx>\n", regs->sp); | 290 | printk(" RSP <%016lx>\n", regs->sp); |
286 | #endif | 291 | #endif |
287 | return 0; | 292 | return 0; |