]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Move resize integrity check under reader lock
authorSteven Rostedt <srostedt@redhat.com>
Fri, 11 Dec 2009 04:20:52 +0000 (23:20 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 11 Dec 2009 04:20:52 +0000 (23:20 -0500)
commit4dd0ffd6b97e17a013884ecfd8e7cdbd2e26f672
treed85e0a7b2b587b41afd1c764e7c25b3fa2962613
parent21fe25e3cedab1a64e2e337bc6d4cebb7b00d60d
ring-buffer: Move resize integrity check under reader lock

While using an application that does splice on the ftrace ring
buffer at start up, I triggered an integrity check failure.

Looking into this, I discovered that resizing the buffer performs
an integrity check after the buffer is resized. This check unfortunately
is preformed after it releases the reader lock. If a reader is
reading the buffer it may cause the integrity check to trigger a
false failure.

This patch simply moves the integrity checker under the protection
of the ring buffer reader lock.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c