summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-03-26 17:33:00 -0400
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-04-08 12:24:22 -0400
commit2930e04d00e113ae24bb2b7c2b58de7b648a62c7 (patch)
tree60dc173d8370ec69d48f04f074ca78fb152d0c1f /kernel/trace
parentfd4a5aef002bb57e8a35ed34d8a878034b9bde94 (diff)
downloadlinux-2930e04d00e113ae24bb2b7c2b58de7b648a62c7.tar.bz2
tracing: Fix race with update_max_tr_single and changing tracers
The commit 34600f0e9 "tracing: Fix race with max_tr and changing tracers" fixed the updating of the main buffers with the race of changing tracers, but left out the fix to the updating of just a per cpu buffer. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 4f1dade56981..7ba7fc76f9eb 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -744,8 +744,11 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)
return;
WARN_ON_ONCE(!irqs_disabled());
- if (WARN_ON_ONCE(!current_trace->allocated_snapshot))
+ if (!current_trace->allocated_snapshot) {
+ /* Only the nop tracer should hit this when disabling */
+ WARN_ON_ONCE(current_trace != &nop_trace);
return;
+ }
arch_spin_lock(&ftrace_max_lock);