]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix ftrace_graph_get_ret_stack() to use task and not current
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 18 Dec 2018 20:50:02 +0000 (15:50 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Sat, 22 Dec 2018 13:21:03 +0000 (08:21 -0500)
commit8a201b338a43cbf1bd296cdb4bf9f707a2b0d68f
tree3e9a132b74db5abafa6cf5e2b4ab7adc268b5e6b
parent7fd3cbf82d79f5d58e38bc3ad5a24e03de0eac31
tracing: Fix ftrace_graph_get_ret_stack() to use task and not current

The function ftrace_graph_get_ret_stack() takes a task struct descriptor but
uses current as the task to perform the operations on. In pretty much all
cases the task decriptor is the same as current, so this wasn't an issue.
But there is a case in the ARM architecture that passes in a task that is
not current, and expects a result from that task, and this code breaks it.

Fixes: 51584396cff5 ("arm64: Use ftrace_graph_get_ret_stack() instead of curr_ret_stack")
Reported-by: James Morse <james.morse@arm.com>
Tested-by: James Morse <james.morse@arm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/fgraph.c