Skip to content

Commit

Permalink
tracing: Fix race with update_max_tr_single and changing tracers
Browse files Browse the repository at this point in the history
The commit 34600f0 "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>
  • Loading branch information
Steven Rostedt (Red Hat) authored and Steven Rostedt committed Apr 8, 2013
1 parent fd4a5ae commit 2930e04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2930e04

Please sign in to comment.