]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Synchronize resizing buffer with reader lock
authorLai Jiangshan <laijs@cn.fujitsu.com>
Tue, 3 Nov 2009 11:42:45 +0000 (19:42 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 4 Nov 2009 05:04:20 +0000 (00:04 -0500)
commitf7112949f6a4cd6883d66c882d568c2197321de6
tree2982044acfce5f1e422be2fd7467d2f1177c5159
parent6d3f1e12f46a2f9a1bb7e7aa433df8dd31ce5647
ring-buffer: Synchronize resizing buffer with reader lock

We got a sudden panic when we reduced the size of the
ringbuffer.

We can reproduce the panic by the following steps:

echo 1 > events/sched/enable
cat trace_pipe > /dev/null &

while ((1))
do
echo 12000 > buffer_size_kb
echo 512 > buffer_size_kb
done

(not more than 5 seconds, panic ...)

Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4AF01735.9060409@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c