Skip to content

Commit 6b8ff51

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fix from Catalin Marinas: "Fix the arm64 usage of ftrace_graph_ret_addr() to pass the &state->graph_idx pointer instead of NULL, otherwise this function just returns early" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: stacktrace: fix the usage of ftrace_graph_ret_addr()
2 parents 890daed + c060f93 commit 6b8ff51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm64/kernel/stacktrace.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@
2525
*
2626
* @common: Common unwind state.
2727
* @task: The task being unwound.
28+
* @graph_idx: Used by ftrace_graph_ret_addr() for optimized stack unwinding.
2829
* @kr_cur: When KRETPROBES is selected, holds the kretprobe instance
2930
* associated with the most recently encountered replacement lr
3031
* value.
3132
*/
3233
struct kunwind_state {
3334
struct unwind_state common;
3435
struct task_struct *task;
36+
int graph_idx;
3537
#ifdef CONFIG_KRETPROBES
3638
struct llist_node *kr_cur;
3739
#endif
@@ -106,7 +108,7 @@ kunwind_recover_return_address(struct kunwind_state *state)
106108
if (state->task->ret_stack &&
107109
(state->common.pc == (unsigned long)return_to_handler)) {
108110
unsigned long orig_pc;
109-
orig_pc = ftrace_graph_ret_addr(state->task, NULL,
111+
orig_pc = ftrace_graph_ret_addr(state->task, &state->graph_idx,
110112
state->common.pc,
111113
(void *)state->common.fp);
112114
if (WARN_ON_ONCE(state->common.pc == orig_pc))

0 commit comments

Comments
 (0)