[for-linus][PATCH 0/2] tracefs: Fixes for 7.1
From: Steven Rostedt
Date: Mon Apr 20 2026 - 14:28:28 EST
tracefs fixes for v7.1:
- Use list_add_tail_rcu() for walking eventfs children
The children link list is protected by SRCU and list walkers can walk the
list without the lock and only using SRCU. Using just list_add_tail() on
weakly ordered architectures can cause issues. Instead use
list_add_tail_rcu().
- Hold eventfs_mutex and SRCU for remount walk events
The trace_apply_options() walks the tracefs_inodes where some are eventfs
inodes and eventfs_remount() is called which in turn calls
eventfs_set_attr(). This walk only holds normal RCU read locks, but the
eventfs_mutex and SRCU should be held. Add a eventfs_remount_(un)lock()
helpers to take the necessary locks before iterating the list.
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
tracefs/fixes
Head SHA1: 07004a8c4b572171934390148ee48c4175c77eed
David Carlier (2):
eventfs: Use list_add_tail_rcu() for SRCU-protected children list
eventfs: Hold eventfs_mutex and SRCU when remount walks events
----
fs/tracefs/event_inode.c | 16 +++++++++++++++-
fs/tracefs/inode.c | 5 ++++-
fs/tracefs/internal.h | 3 +++
3 files changed, 22 insertions(+), 2 deletions(-)