ring-buffer: add reader lock
authorSteven Rostedt <srostedt@redhat.com>
Tue, 11 Nov 2008 17:47:44 +0000 (18:47 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 11 Nov 2008 17:47:44 +0000 (18:47 +0100)
commitf83c9d0fe42a7544b4d4ffcebb2e6716fcfd95c0
tree37532424c8ea5a8dac649cb2baed04223722c09f
parentf536aafc5a2e6f0c8f1577a155e6f93db5e469f0
ring-buffer: add reader lock

Impact: serialize reader accesses to individual CPU ring buffers

The code in the ring buffer expects only one reader at a time, but currently
it puts that requirement on the caller. This is not strong enough, and this
patch adds a "reader_lock" that serializes the access to the reader API
of the ring buffer.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/ring_buffer.c