Skip to content

tracing: Fix buffer_meta open paths

David Carlier linux-trace-kernel lkml stable 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v11 patch 1 replySuperseded

Changes in v2 from the cover letter

- Add patch 2 for the NULL dereference Sashiko reported on v1.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tracing: Take trace_types_lock when dropping the buffer_meta referencekernel/trace/trace.c+1 -10 replies
2/2ring-buffer: Do not show buffer_meta for CPUs without a bufferkernel/trace/ring_buffer.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] tracing: Fix buffer_meta open paths

Two fixes for per_cpu/cpuN/buffer_meta open. The first drops the trace_array reference under trace_types_lock on the error path. The second fails the open for CPUs that never came online, which would otherwise dereference a NULL cpu_buffer on read. With the second patch, that error path becomes reachable in practice.

Changes since v1:
- Add patch 2 for the NULL dereference Sashiko reported on v1.

v1: https://lore.kernel.org/all/[email protected]/

David Carlier (2):
tracing: Take trace_types_lock when dropping the buffer_meta reference
ring-buffer: Do not show buffer_meta for CPUs without a buffer

 kernel/trace/ring_buffer.c | 3 +++
 kernel/trace/trace.c       | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.55.0