mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] tracing: Fix buffer_meta open paths
@ 2026-09-14 13:35 David Carlier
  2026-09-14 13:35 ` [PATCH v2 1/2] tracing: Take trace_types_lock when dropping the buffer_meta reference David Carlier
  2026-09-14 13:35 ` [PATCH v2 2/2] ring-buffer: Do not show buffer_meta for CPUs without a buffer David Carlier
  0 siblings, 2 replies; 3+ messages in thread
From: David Carlier @ 2026-09-14 13:35 UTC (permalink / raw)
  To: rostedt, mhiramat
  Cc: mathieu.desnoyers, linux-trace-kernel, linux-kernel, David Carlier

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/20260913133829.15307-1-devnexen@gmail.com/

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(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-14 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 13:35 [PATCH v2 0/2] tracing: Fix buffer_meta open paths David Carlier
2026-09-14 13:35 ` [PATCH v2 1/2] tracing: Take trace_types_lock when dropping the buffer_meta reference David Carlier
2026-09-14 13:35 ` [PATCH v2 2/2] ring-buffer: Do not show buffer_meta for CPUs without a buffer David Carlier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®