[for-linus][PATCH 0/5] tracing: More fixes for v7.3

From: Steven Rostedt

Date: Sun Sep 13 2026 - 13:18:04 EST



tracing fixes for 7.3:

- Use rcu_assign_pointer() for tmp_ops filter hash

The tmp_ops used in update_ftrace_direct_mod() assigns its filter_hash
field directly, but that field is annotated as __rcu and sparse complains.
Assign it with rcu_assign_pointer()

- Fix use-after-free in enable_trigger_private_data_free()

The trace_event_call is accessed through the event_trigger_data's
trace_event_file pointer to put the trace_event_call on freeing. The issue
is that the trace_event_file data may have been freed already causing a
use-after-free. Add a field to the event_trigger_data that points directly
to the trace_event_call so that it can decrement its reference directly
without needing to go through the trace_event_file.

- Fix accounting of buffer data remote headers

trace_buffer_desc_size() and trace_remote_alloc_buffer() undercount the
number of pages is needed for the asked for size as it doesn't take into
account the meta data on each page. Add a helper function to do the
calculation properly and use that in these functions.

- Catch nr_page_va overflow in ring_buffer_desc sizing

The number of pages per remote ring buffer is capped by
ring_buffer_desc::nr_page_va (32 bits). A buffer_size large enough to
overflow that field would silently allocate a descriptor smaller than what
was asked for.

- Do not resize the subbuf order if any per_cpu buffer is disabled

The mmapping of ring buffers disables resizing the subbuffers, but it is
done per-cpu whereas the subbuf size change is done for all the per_cpu
buffers under the buffer->mutex. It could change the size of some while
the mapping is happening on others. Have the resize of the subbuf order
check all the per_cpu buffers under the lock to see if any of them is
disabled before starting and causing an inconsistency between buffers that
are being mapped.


git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes

Head SHA1: d860c67c051685abb0460b593b193f0f45f4fa92


Ali Ahmet MemiÅ? (1):
tracing: Don't dereference trace_event_file in deferred trigger free

David Carlier (1):
ring-buffer: Check resize_disabled before publishing the new subbuf order

Leon Hwang (1):
ftrace: Use rcu_assign_pointer() for tmp_ops filter hash

Vincent Donnefort (2):
tracing/remotes: Account for ring buffer page header in size calculation
tracing/remotes: Catch nr_page_va overflow in ring_buffer_desc sizing

----
include/linux/ring_buffer.h | 19 +++++++++++++++++--
kernel/trace/ftrace.c | 2 +-
kernel/trace/ring_buffer.c | 8 ++++++++
kernel/trace/trace.h | 1 +
kernel/trace/trace_events_trigger.c | 4 +++-
kernel/trace/trace_remote.c | 6 +++++-
6 files changed, 35 insertions(+), 5 deletions(-)