Skip to content

Commit

Permalink
tracing: use nowakeup version of commit for function event trace tests
Browse files Browse the repository at this point in the history
The startup tests for the event tracer also runs with the function
tracer enabled. The "wakeup" version of the trace commit was used
which can grab spinlocks. If a task was preempted by an NMI
that called a function being traced, it could deadlock due to the
function tracer trying to grab the same lock.

Thanks to Frederic Weisbecker for pointing out where the bug was.

Reported-by: Ingo Molnar <mingo@elte.hu>
Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Apr 20, 2009
1 parent aa18efb commit cb4764a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ function_test_events_call(unsigned long ip, unsigned long parent_ip)
entry->ip = ip;
entry->parent_ip = parent_ip;

trace_current_buffer_unlock_commit(event, flags, pc);
trace_nowake_buffer_unlock_commit(event, flags, pc);

out:
atomic_dec(&per_cpu(test_event_disable, cpu));
Expand Down

0 comments on commit cb4764a

Please sign in to comment.