Commit cb4764a6 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

tracing: use nowakeup version of commit for function event trace tests

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: default avatarIngo Molnar <mingo@elte.hu>
Reported-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent aa18efb2
...@@ -1164,7 +1164,7 @@ function_test_events_call(unsigned long ip, unsigned long parent_ip) ...@@ -1164,7 +1164,7 @@ function_test_events_call(unsigned long ip, unsigned long parent_ip)
entry->ip = ip; entry->ip = ip;
entry->parent_ip = parent_ip; entry->parent_ip = parent_ip;
trace_current_buffer_unlock_commit(event, flags, pc); trace_nowake_buffer_unlock_commit(event, flags, pc);
out: out:
atomic_dec(&per_cpu(test_event_disable, cpu)); atomic_dec(&per_cpu(test_event_disable, cpu));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment