[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201210142606.911077398@linuxfoundation.org>
Date: Thu, 10 Dec 2020 15:26:42 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, "J. Avila" <elavila@...gle.com>,
Daniel Mentz <danielmentz@...gle.com>,
Will McVicker <willmcvicker@...gle.com>,
"Steven Rostedt (VMware)" <rostedt@...dmis.org>
Subject: [PATCH 5.9 17/75] ring-buffer: Update write stamp with the correct ts
From: Steven Rostedt (VMware) <rostedt@...dmis.org>
commit 55ea4cf403800af2ce6b125bc3d853117e0c0456 upstream.
The write stamp, used to calculate deltas between events, was updated with
the stale "ts" value in the "info" structure, and not with the updated "ts"
variable. This caused the deltas between events to be inaccurate, and when
crossing into a new sub buffer, had time go backwards.
Link: https://lkml.kernel.org/r/20201124223917.795844-1-elavila@google.com
Cc: stable@...r.kernel.org
Fixes: a389d86f7fd09 ("ring-buffer: Have nested events still record running time stamp")
Reported-by: "J. Avila" <elavila@...gle.com>
Tested-by: Daniel Mentz <danielmentz@...gle.com>
Tested-by: Will McVicker <willmcvicker@...gle.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
kernel/trace/ring_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -3291,7 +3291,7 @@ __rb_reserve_next(struct ring_buffer_per
/* Nothing came after this event between C and E */
info->delta = ts - info->after;
(void)rb_time_cmpxchg(&cpu_buffer->write_stamp,
- info->after, info->ts);
+ info->after, ts);
info->ts = ts;
} else {
/*
Powered by blists - more mailing lists