linux/fs/tracefs
Linus Torvalds 1484625c59 tracefs updates for v7.3:
- Define event fields before directory creation
 
   Move the event_define_fields() call in event_create_dir() before the
   eventfs directory creation. Previously, a failure after directory
   creation wouldn't clean up eventfs_inode because the error path didn't
   call eventfs_remove_dir(). This eliminates the need to clean up the
   eventfs directories if event_define_fields() fails.
 
 - Add warning for out of bounds pos in __eventfs_iterate()
 
   Sashiko complains about the ctx->pos causing issues if it is less than 2
   or greater than MAX_INT in __eventfs_iterate(). The thing is, the logic
   prevents that from happening. But to make Sashiko happy, add a WARN_ON()
   and exit safely if the function ever does get input that is out of the
   range the function expects.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCan+ZvBQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qtTfAQC+70AlkM07/RxLkS6GYEEoJ1orM/CO
 eheyYNZvdjovogEAoUjt0VO+PEcqKDkIdCpx3l9M4hu+B7hN51S2gdEz8gE=
 =EqMA
 -----END PGP SIGNATURE-----

Merge tag 'tracefs-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracefs updates from Steven Rostedt:

 - Define event fields before directory creation

   Move the event_define_fields() call in event_create_dir() before the
   eventfs directory creation. Previously, a failure after directory
   creation wouldn't clean up eventfs_inode because the error path
   didn't call eventfs_remove_dir(). This eliminates the need to clean
   up the eventfs directories if event_define_fields() fails.

 - Add warning for out of bounds pos in __eventfs_iterate()

   Sashiko complains about the ctx->pos causing issues if it is less
   than 2 or greater than MAX_INT in __eventfs_iterate(). The thing is,
   the logic prevents that from happening. But to make Sashiko happy,
   add a WARN_ON() and exit safely if the function ever does get input
   that is out of the range the function expects.

* tag 'tracefs-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  eventfs: Add warning for out of bounds pos in __eventfs_iterate()
  eventfs: Define event fields before directory creation
2026-08-19 14:18:45 -07:00
..
event_inode.c tracefs updates for v7.3: 2026-08-19 14:18:45 -07:00
inode.c tracefs fixes for v7.1: 2026-04-22 15:09:01 -07:00
internal.h eventfs: Use children field for rcu head and add memory barriers 2026-08-08 10:36:05 -04:00
Makefile eventfs: Implement eventfs dir creation functions 2023-07-30 18:13:33 -04:00