]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
tracing/events: don't discard an event after commit
authorFrederic Weisbecker <fweisbec@gmail.com>
Sun, 22 Mar 2009 23:18:39 +0000 (00:18 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 23 Mar 2009 08:22:15 +0000 (09:22 +0100)
commitb118415bfad6d75792a85ac999e25149db8e6919
tree21d3a6caf595bdf090fc9432d13003aef977fc1c
parent7e6ea92df3fd7cbe74e7985c6f3e40255c44b201
tracing/events: don't discard an event after commit

When we want to filter an event, the filter test is done after
the event is commited to the ring-buffer to be discarded later if
needed.

But a reader could be reading this event while we are trying to discard
it. Other kind of racy events can even happen because the event is
commited and can be read and/or consumed.

What we want is to discard the event before committing it.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <1237763919-21505-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_events_stage_3.h