]> git.karo-electronics.de Git - linux-beck.git/commitdiff
tracing: use nowakeup version of commit for function event trace tests
authorSteven Rostedt <srostedt@redhat.com>
Mon, 20 Apr 2009 22:16:44 +0000 (18:16 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 20 Apr 2009 22:16:44 +0000 (18:16 -0400)
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>
kernel/trace/trace_events.c

index 98daf5dc74a6d253907e77d36230caed24d22750..672b195f86c9c486ba2cb6032c4c7befd0734e54 100644 (file)
@@ -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));