summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt2009-06-02 22:39:48 +0200
committerSteven Rostedt2009-06-02 22:49:57 +0200
commitf7e8b616ed1cc6f790b82324bce8a2a60295e5c2 (patch)
treee46e50692d90ddcccf159accdcdd655d3dd0ffa5 /kernel/trace
parentfunction-graph: add memory barriers for accessing task's ret_stack (diff)
downloadkernel-qcow2-linux-f7e8b616ed1cc6f790b82324bce8a2a60295e5c2.tar.gz
kernel-qcow2-linux-f7e8b616ed1cc6f790b82324bce8a2a60295e5c2.tar.xz
kernel-qcow2-linux-f7e8b616ed1cc6f790b82324bce8a2a60295e5c2.zip
function-graph: move initialization of new tasks up in fork
When the function graph tracer is enabled, all new tasks must allocate a ret_stack to place the return address of functions. This is because the function graph tracer will replace the real return address with a call to the tracing of the exit function. This initialization happens in fork, but it happens too late. If fork fails, then it will call free_task and that calls the freeing of this ret_stack. But before initialization happens, the new (failed) task points to its parents ret_stack. If a fork failure happens during the function trace, it would be catastrophic for the parent. Also, there's no need to call ftrace_graph_exit_task from fork, since it is called by free_task which fork calls on failure. [ Impact: prevent crash during failed fork running function graph tracer ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
0 files changed, 0 insertions, 0 deletions