sh: ftrace: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack
The structure of the ret_stack array on the task struct is going to change, and accessing it directly via the curr_ret_stack index will no longer give the ret_stack entry that holds the return address. To access that, architectures must now use ftrace_graph_get_ret_stack() to get the associated ret_stack that matches the saved return address. Cc: linux-sh@vger.kernel.org Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
@@ -59,17 +59,20 @@ print_ftrace_graph_addr(unsigned long addr, void *data,
|
||||
struct thread_info *tinfo, int *graph)
|
||||
{
|
||||
struct task_struct *task = tinfo->task;
|
||||
struct ftrace_ret_stack *ret_stack;
|
||||
unsigned long ret_addr;
|
||||
int index = task->curr_ret_stack;
|
||||
|
||||
if (addr != (unsigned long)return_to_handler)
|
||||
return;
|
||||
|
||||
if (!task->ret_stack || index < *graph)
|
||||
if (!task->ret_stack)
|
||||
return;
|
||||
|
||||
index -= *graph;
|
||||
ret_addr = task->ret_stack[index].ret;
|
||||
ret_stack = ftrace_graph_get_ret_stack(task, *graph);
|
||||
if (!ret_stack)
|
||||
return;
|
||||
|
||||
ret_addr = ret_stack->ret;
|
||||
|
||||
ops->address(data, ret_addr, 1);
|
||||
|
||||
|
Reference in New Issue
Block a user