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)
committerSteven Rostedt <rostedt@goodmis.org>
Sat, 13 Mar 2010 01:26:56 +0000 (20:26 -0500)
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.

Cc: stable@kernel.org
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>

No differences found