summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions_graph.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 04:58:10 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 04:58:10 +0200
commit991ec02cdca33b03a132a0cacfe6f0aa0be9aa8d (patch)
tree50b5f4e2b9f138da57f76eca44fdcc80a2fcd428 /kernel/trace/trace_functions_graph.c
parentMerge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
parentfunction-graph: always initialize task ret_stack (diff)
downloadlinux-991ec02cdca33b03a132a0cacfe6f0aa0be9aa8d.tar.xz
linux-991ec02cdca33b03a132a0cacfe6f0aa0be9aa8d.zip
Merge branch 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: function-graph: always initialize task ret_stack function-graph: move initialization of new tasks up in fork function-graph: add memory barriers for accessing task's ret_stack function-graph: enable the stack after initialization of other variables function-graph: only allocate init tasks if it was not already done Manually fix trivial conflict in kernel/trace/ftrace.c
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r--kernel/trace/trace_functions_graph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 10f6ad7d85f6..8b592418d8b2 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -65,6 +65,12 @@ ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth)
if (!current->ret_stack)
return -EBUSY;
+ /*
+ * We must make sure the ret_stack is tested before we read
+ * anything else.
+ */
+ smp_rmb();
+
/* The return trace stack is full */
if (current->curr_ret_stack == FTRACE_RETFUNC_DEPTH - 1) {
atomic_inc(&current->trace_overrun);