]> git.ipfire.org Git - people/ms/linux.git/commit
ring-buffer: Move disabled check into preempt disable section
authorLai Jiangshan <laijs@cn.fujitsu.com>
Mon, 8 Mar 2010 06:50:43 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:01:14 +0000 (16:01 -0700)
commit01a8e5d5cc7a5dde54fbff3cee4792a2501d133b
treedc115be6923030fb51218a811bf2dd083617bea3
parentcd8c2b3ae748b9e8e0c9bc397a5b030800f637ae
ring-buffer: Move disabled check into preempt disable section

commit 52fbe9cde7fdb5c6fac196d7ebd2d92d05ef3cd4 upstream.

The ring buffer resizing and resetting relies on a schedule RCU
action. The buffers are disabled, a synchronize_sched() is called
and then the resize or reset takes place.

But this only works if the disabling of the buffers are within the
preempt disabled section, otherwise a window exists that the buffers
can be written to while a reset or resize takes place.

Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B949E43.2010906@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/trace/ring_buffer.c