diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-03-22 23:10:46 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-23 09:22:14 +0100 |
commit | 07edf7121374609709ef1b0889f6e7b8d6a62ec1 (patch) | |
tree | ad1649c9546dc3ce23bb2f8609a7459a7ca2006e /kernel/trace/trace.h | |
parent | 9bd7d099ab3f10dd666da399c064999bae427cd9 (diff) | |
download | kernel_samsung_crespo-07edf7121374609709ef1b0889f6e7b8d6a62ec1.zip kernel_samsung_crespo-07edf7121374609709ef1b0889f6e7b8d6a62ec1.tar.gz kernel_samsung_crespo-07edf7121374609709ef1b0889f6e7b8d6a62ec1.tar.bz2 |
tracing/events: don't use wake up for events
Impact: fix hard-lockup with sched switch events
Some ftrace events, such as sched wakeup, can be traced
while the runqueue lock is hold. Since they are using
trace_current_buffer_unlock_commit(), they call wake_up()
which can try to grab the runqueue lock too, resulting in
a deadlock.
Now for all event, we call a new helper:
trace_nowake_buffer_unlock_commit() which do pretty the same than
trace_current_buffer_unlock_commit() except than it doesn't call
trace_wake_up().
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <1237759847-21025-4-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r-- | kernel/trace/trace.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index f267723..54fd9bc 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -483,6 +483,8 @@ trace_current_buffer_lock_reserve(unsigned char type, unsigned long len, unsigned long flags, int pc); void trace_current_buffer_unlock_commit(struct ring_buffer_event *event, unsigned long flags, int pc); +void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event, + unsigned long flags, int pc); struct trace_entry *tracing_get_trace_entry(struct trace_array *tr, struct trace_array_cpu *data); |