Skip to content

Commit f35dbac

Browse files
mhiramatrostedt
authored andcommitted
ring-buffer: Fix to update per-subbuf entries of persistent ring buffer
Since the validation loop in rb_meta_validate_events() updates the same cpu_buffer->head_page->entries, the other subbuf entries are not updated. Fix to use head_page to update the entries field, since it is the cursor in this loop. Cc: [email protected] Cc: Mathieu Desnoyers <[email protected]> Cc: Ian Rogers <[email protected]> Fixes: 5f3b6e8 ("ring-buffer: Validate boot range memory events") Link: https://patch.msgid.link/177391153882.193994.17158784065013676533.stgit@mhiramat.tok.corp.google.com Signed-off-by: Masami Hiramatsu (Google) <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 07183aa commit f35dbac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/trace/ring_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
20532053

20542054
entries += ret;
20552055
entry_bytes += local_read(&head_page->page->commit);
2056-
local_set(&cpu_buffer->head_page->entries, ret);
2056+
local_set(&head_page->entries, ret);
20572057

20582058
if (head_page == cpu_buffer->commit_page)
20592059
break;

0 commit comments

Comments
 (0)