diff options
Diffstat (limited to 'arch/x86/kernel/unwind_guess.c')
-rw-r--r-- | arch/x86/kernel/unwind_guess.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/kernel/unwind_guess.c b/arch/x86/kernel/unwind_guess.c index 9298993dc8b7..2d721e533cf4 100644 --- a/arch/x86/kernel/unwind_guess.c +++ b/arch/x86/kernel/unwind_guess.c | |||
@@ -47,7 +47,14 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task, | |||
47 | get_stack_info(first_frame, state->task, &state->stack_info, | 47 | get_stack_info(first_frame, state->task, &state->stack_info, |
48 | &state->stack_mask); | 48 | &state->stack_mask); |
49 | 49 | ||
50 | if (!__kernel_text_address(*first_frame)) | 50 | /* |
51 | * The caller can provide the address of the first frame directly | ||
52 | * (first_frame) or indirectly (regs->sp) to indicate which stack frame | ||
53 | * to start unwinding at. Skip ahead until we reach it. | ||
54 | */ | ||
55 | if (!unwind_done(state) && | ||
56 | (!on_stack(&state->stack_info, first_frame, sizeof(long)) || | ||
57 | !__kernel_text_address(*first_frame))) | ||
51 | unwind_next_frame(state); | 58 | unwind_next_frame(state); |
52 | } | 59 | } |
53 | EXPORT_SYMBOL_GPL(__unwind_start); | 60 | EXPORT_SYMBOL_GPL(__unwind_start); |