Commit 2cf9733
committed
ring-buffer: Fix refcount setting of boot mapped buffers
A ring buffer which has its buffered mapped at boot up to fixed memory
should not be freed. Other buffers can be. The ref counting setup was
wrong for both. It made the not mapped buffers ref count have zero, and the
boot mapped buffer a ref count of 1. But an normally allocated buffer
should be 1, where it can be removed.
Keep the ref count of a normal boot buffer with its setup ref count (do
not decrement it), and increment the fixed memory boot mapped buffer's ref
count.
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/[email protected]
Fixes: e645535 ("tracing: Add option to use memmapped memory for trace boot instance")
Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 912da2c commit 2cf9733
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10621 | 10621 | | |
10622 | 10622 | | |
10623 | 10623 | | |
10624 | | - | |
| 10624 | + | |
10625 | 10625 | | |
10626 | | - | |
10627 | | - | |
| 10626 | + | |
| 10627 | + | |
10628 | 10628 | | |
10629 | 10629 | | |
10630 | 10630 | | |
| |||
0 commit comments