diff options
author | David S. Miller <davem@davemloft.net> | 2016-12-10 16:21:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-10 16:21:55 -0500 |
commit | 821781a9f40673c2aa0f29d9d8226ec320dff20c (patch) | |
tree | c9d5cb8a184fff84a9d841d8cb5da4b26be5c551 /arch/x86/kernel/unwind_guess.c | |
parent | 3174fed9820edc95cff74ad0934c3240c7fb5115 (diff) | |
parent | 045169816b31b10faed984b01c390db1b32ee4c1 (diff) | |
download | linux-821781a9f40673c2aa0f29d9d8226ec320dff20c.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'arch/x86/kernel/unwind_guess.c')
-rw-r--r-- | arch/x86/kernel/unwind_guess.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/kernel/unwind_guess.c b/arch/x86/kernel/unwind_guess.c index b80e8bf43cc6..22881ddcbb9f 100644 --- a/arch/x86/kernel/unwind_guess.c +++ b/arch/x86/kernel/unwind_guess.c @@ -7,11 +7,13 @@ unsigned long unwind_get_return_address(struct unwind_state *state) { - unsigned long addr = READ_ONCE_NOCHECK(*state->sp); + unsigned long addr; if (unwind_done(state)) return 0; + addr = READ_ONCE_NOCHECK(*state->sp); + return ftrace_graph_ret_addr(state->task, &state->graph_idx, addr, state->sp); } @@ -25,11 +27,12 @@ bool unwind_next_frame(struct unwind_state *state) return false; do { - unsigned long addr = READ_ONCE_NOCHECK(*state->sp); + for (state->sp++; state->sp < info->end; state->sp++) { + unsigned long addr = READ_ONCE_NOCHECK(*state->sp); - for (state->sp++; state->sp < info->end; state->sp++) if (__kernel_text_address(addr)) return true; + } state->sp = info->next_sp; |