diff options
-rw-r--r-- | arch/x86/kernel/dumpstack_64.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c index 0ad9597073f5..a6c906c9b193 100644 --- a/arch/x86/kernel/dumpstack_64.c +++ b/arch/x86/kernel/dumpstack_64.c | |||
@@ -125,9 +125,15 @@ fixup_bp_irq_link(unsigned long bp, unsigned long *stack, | |||
125 | { | 125 | { |
126 | #ifdef CONFIG_FRAME_POINTER | 126 | #ifdef CONFIG_FRAME_POINTER |
127 | struct stack_frame *frame = (struct stack_frame *)bp; | 127 | struct stack_frame *frame = (struct stack_frame *)bp; |
128 | unsigned long next; | ||
128 | 129 | ||
129 | if (!in_irq_stack(stack, irq_stack, irq_stack_end)) | 130 | if (!in_irq_stack(stack, irq_stack, irq_stack_end)) { |
130 | return (unsigned long)frame->next_frame; | 131 | if (!probe_kernel_address(&frame->next_frame, next)) |
132 | return next; | ||
133 | else | ||
134 | WARN_ONCE(1, "Perf: bad frame pointer = %p in " | ||
135 | "callchain\n", &frame->next_frame); | ||
136 | } | ||
131 | #endif | 137 | #endif |
132 | return bp; | 138 | return bp; |
133 | } | 139 | } |