summaryrefslogtreecommitdiff
path: root/Documentation/sync_file.txt
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-11-19 23:18:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 21:32:11 +0300
commitd2bcf809e838579902b0075f00a57aff2f1e27a4 (patch)
tree88d48d6dc33160f86a21fa950564d20b064665b9 /Documentation/sync_file.txt
parentaec14c812ba877d94837d78def1832822594598a (diff)
downloadlinux-d2bcf809e838579902b0075f00a57aff2f1e27a4.tar.xz
function_graph: Move return callback before update of curr_ret_stack
commit 552701dd0fa7c3d448142e87210590ba424694a0 upstream. In the past, curr_ret_stack had two functions. One was to denote the depth of the call graph, the other is to keep track of where on the ret_stack the data is used. Although they may be slightly related, there are two cases where they need to be used differently. The one case is that it keeps the ret_stack data from being corrupted by an interrupt coming in and overwriting the data still in use. The other is just to know where the depth of the stack currently is. The function profiler uses the ret_stack to save a "subtime" variable that is part of the data on the ret_stack. If curr_ret_stack is modified too early, then this variable can be corrupted. The "max_depth" option, when set to 1, will record the first functions going into the kernel. To see all top functions (when dealing with timings), the depth variable needs to be lowered before calling the return hook. But by lowering the curr_ret_stack, it makes the data on the ret_stack still being used by the return hook susceptible to being overwritten. Now that there's two variables to handle both cases (curr_ret_depth), we can move them to the locations where they can handle both cases. Cc: stable@kernel.org Fixes: 03274a3ffb449 ("tracing/fgraph: Adjust fgraph depth before calling trace return callback") Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/sync_file.txt')
0 files changed, 0 insertions, 0 deletions