diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-03-12 19:41:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 16:01:16 -0700 |
commit | a86a83770fe3cc858f91b0ae6406477dc8d0bf17 (patch) | |
tree | cf4a66ad68b7bbd83e38b200c090a871ee7e8afb /ipc | |
parent | 65bddd361043f9e65122c39f714d3d6471c5c0e3 (diff) | |
download | lwn-a86a83770fe3cc858f91b0ae6406477dc8d0bf17.tar.gz lwn-a86a83770fe3cc858f91b0ae6406477dc8d0bf17.zip |
function-graph: Init curr_ret_stack with ret_stack
commit ea14eb714041d40fcc5180b5a586034503650149 upstream.
If the graph tracer is active, and a task is forked but the allocating of
the processes graph stack fails, it can cause crash later on.
This is due to the temporary stack being NULL, but the curr_ret_stack
variable is copied from the parent. If it is not -1, then in
ftrace_graph_probe_sched_switch() the following:
for (index = next->curr_ret_stack; index >= 0; index--)
next->ret_stack[index].calltime += timestamp;
Will cause a kernel OOPS.
Found with Li Zefan's ftrace_stress_test.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions