Skip to content

tracefs: Fixes for 7.1

Steven Rostedt lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2eventfs: Use list_add_tail_rcu() for SRCU-protected children listfs/tracefs/event_inode.c+1 -10 replies
2/2eventfs: Hold eventfs_mutex and SRCU when remount walks eventsfs/tracefs/event_inode.c fs/tracefs/inode.c fs/tracefs/internal.h+21 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [for-linus][PATCH 0/2] tracefs: Fixes for 7.1

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