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