diff options
-rw-r--r-- | kernel/trace/ring_buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 1da7b6ea8b85..5ec8f1d1480e 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -3868,6 +3868,9 @@ int ring_buffer_read_page(struct ring_buffer *buffer, | |||
3868 | rpos = reader->read; | 3868 | rpos = reader->read; |
3869 | pos += size; | 3869 | pos += size; |
3870 | 3870 | ||
3871 | if (rpos >= commit) | ||
3872 | break; | ||
3873 | |||
3871 | event = rb_reader_event(cpu_buffer); | 3874 | event = rb_reader_event(cpu_buffer); |
3872 | size = rb_event_length(event); | 3875 | size = rb_event_length(event); |
3873 | } while (len > size); | 3876 | } while (len > size); |