summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-02 20:56:48 -0500
committerSteven Rostedt <srostedt@redhat.com>2009-03-03 20:50:54 -0500
commit41be4da4e85e58520b934040966a6ae919c66c2d (patch)
tree5a5b0225111a8e0c083ce9eb129f9786a335a92e
parent633ddaa7f471e9db181f993c1458d6f4bae321ca (diff)
ring-buffer: reset write field for ring_buffer_read_page
Impact: fix ring_buffer_read_page After a page is swapped into the ring buffer, the write field must also be reset. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r--kernel/trace/ring_buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index a8c275c01e83..9baad7ee4b36 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2492,6 +2492,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
rb_init_page(bpage);
bpage = cpu_buffer->reader_page->page;
cpu_buffer->reader_page->page = *data_page;
+ local_set(&cpu_buffer->reader_page->write, 0);
cpu_buffer->reader_page->read = 0;
*data_page = bpage;
}