]> git.itanic.dy.fi Git - linux-stable/commit
ring-buffer: Update write stamp with the correct ts
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 27 Nov 2020 16:20:58 +0000 (11:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Dec 2020 12:22:05 +0000 (13:22 +0100)
commitfd3a46f25bb4ffc1f80fe1925a031a82982aeb14
tree941e9e4b600c9c48d29f1550493c0ed1a07e804c
parent3555ab3552621852d89707b0f9cab7c5c27f8786
ring-buffer: Update write stamp with the correct ts

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@vger.kernel.org
Fixes: a389d86f7fd09 ("ring-buffer: Have nested events still record running time stamp")
Reported-by: "J. Avila" <elavila@google.com>
Tested-by: Daniel Mentz <danielmentz@google.com>
Tested-by: Will McVicker <willmcvicker@google.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/ring_buffer.c