diff options
author | linke li <[email protected]> | 2024-03-02 12:42:21 +0800 |
---|---|---|
committer | Steven Rostedt (Google) <[email protected]> | 2024-03-17 07:58:53 -0400 |
commit | f1e30cb6369251c03f63c564006f96a54197dcc4 (patch) | |
tree | 7daeb8da65790a1fc00b9ba6c72c4958d4753cd7 /tools/perf/util/trace-event-scripting.c | |
parent | 6b76323e5a483e53568254146c3d141123f3b839 (diff) |
ring-buffer: use READ_ONCE() to read cpu_buffer->commit_page in concurrent environment
In function ring_buffer_iter_empty(), cpu_buffer->commit_page is read
while other threads may change it. It may cause the time_stamp that read
in the next line come from a different page. Use READ_ONCE() to avoid
having to reason about compiler optimizations now and in future.
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Signed-off-by: linke li <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions