From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> If the buffer passed in is exactly the size needed to add an event, it will not because it checks with: while (len > kbuf->next - save_curr) { Instead of while (len >= kbuf->next - save_curr) { Fixes: 05821189 ("kbuffer: Add kbuffer_read_buffer()") Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/kbuffer-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kbuffer-parse.c b/src/kbuffer-parse.c index d43fe5d972fd..4801d432c58c 100644 --- a/src/kbuffer-parse.c +++ b/src/kbuffer-parse.c @@ -995,7 +995,7 @@ int kbuffer_read_buffer(struct kbuffer *kbuf, void *buffer, int len) /* Due to timestamps, we must save the current next to use */ last_next = kbuf->next; - while (len > kbuf->next - save_curr) { + while (len >= kbuf->next - save_curr) { last_next = kbuf->next; if (!kbuffer_next_event(kbuf, &ts)) break; -- 2.42.0