linux/fs
Linus Torvalds 034dd340b0 tracing fixes for v7.3:
- Fix error output of boot instance creation failure
 
   Currently if a boot instance creation fails, instead of printing out the
   name of the instance that failed, it prints "(null)". That is because it
   prints "cur_str" that had already been processed by strsep(). Print the
   saved name instead.
 
   While at it, print the error code of the failure.
 
 - Fix use-after-free for same named historgrams
 
   Histograms can be named so that they can be used in multiple events. But
   if the named histogram has a variable attached, the second event that uses
   the named histogram which duplicates it and needs to free the original
   after duplication leaves the old variable in place and still visible. If
   another histogram uses than variable, it will use the stale one which will
   try to reference the freed duplicate histogram and crash the kernel.
 
   Free the duplicate variables along with the duplicated histogram data.
 
 - Check return value of kthread_run() in event self test
 
   The events self tests uses a kthread for testing but does not check if it
   succeeded in creating a kthread. If the kthread creation were to fail, the
   code will still try to call kthread_stop() on the error returned.
 
 - Fix race between reading trace_pipe and updating subbuffer size
 
   If a user is reading the trace_pipe file at the same time they update the
   ring buffer sub-buffer size, can cause the trace_pipe read to read stale
   data. Add trace_access_lock() around updating the ring buffer sub-buffer
   size.
 
 - Fix eventfs_inode on failure path in creation of the events directory
 
   In the creation of the "events" directory, if after allocating the
   eventfs_inode a failure is detected, it calls cleanup_ei() which calls
   free_ei(). The free_ei() will test if eventfs_inode being freed has no
   children. It is a bug if it does. But on the failure case of the creation
   of the "events" directory, the children lists have not yet been
   initialized and the free will trigger a warning because list_empty() on an
   uninitialized list returns false.
 
   Move the initialization into init_ei() where it makes more sense and makes
   sure that a created eventfs_inode has its lists initialized upon creation.
 
 - Check return value of kthread_run() in ftrace direct sample code
 
   The sample code that shows how to use the ftrace direct calls does not
   test the return of kthread_run() to see if it succeeds. Return a failure
   if the kthread_run() doesn't succeed.
 
 - Clear user events state on fork in case of alloc failure
 
   On fork, the child gets a pointer to the parent's user events state. It
   makes a copy of it then updates the child's pointer to it. But if the
   allocation fails, the duplication function leaves the child with a pointer
   to its parent's descriptor. When the child cleans up its data, it will free
   the parent's descriptor while the parent is still using it.
 
   In the duplication function, set the child's user_event_mm to NULL before
   testing if the allocation succeeded, and when it exits it will not free
   the parent's descriptor.
 
 - Fix retry exhaustion in simple ring buffer reader swap
 
   simple_ring_buffer_swap_reader_page() starts with retry set to 8 and
   post-decrements it only after a failed link replacement. On the final
   attempt, a successful replacement leaves retry at zero, while a failed
   replacement leaves it at -1.
 
   But the check for success expects the retry value to be non-zero and exits
   with an error on zero. This is the opposite result. Fix it.
 
 - Fail nicely when the remote swap_reader_page() returns an error
 
   Currently, if the swap_reader_page() of a remote buffer fails, it triggers
   a WARN_ON_ONCE() and continues normally. Instead, have it exit with an
   error and a pr_warn() print instead of a full WARNING.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYKADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCapOC3hQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qvjkAQCGVuyK980rwiBnfenWLpeB3QjfHA8B
 mV0mJSlGWm1t1gEA9WWzMGbp+OHeRV2xyA+xW7OS1S58VO9OIGrzXCGqbAM=
 =TrF5
 -----END PGP SIGNATURE-----

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

Pull tracing fixes from Steven Rostedt:

 - Fix error output of boot instance creation failure

   Currently if a boot instance creation fails, instead of printing out
   the name of the instance that failed, it prints "(null)". That is
   because it prints "cur_str" that had already been processed by
   strsep(). Print the saved name instead.

   While at it, print the error code of the failure.

 - Fix use-after-free for same named historgrams

   Histograms can be named so that they can be used in multiple events.
   But if the named histogram has a variable attached, the second event
   that uses the named histogram which duplicates it and needs to free
   the original after duplication leaves the old variable in place and
   still visible. If another histogram uses than variable, it will use
   the stale one which will try to reference the freed duplicate
   histogram and crash the kernel.

   Free the duplicate variables along with the duplicated histogram
   data.

 - Check return value of kthread_run() in event self test

   The events self tests uses a kthread for testing but does not check
   if it succeeded in creating a kthread. If the kthread creation were
   to fail, the code will still try to call kthread_stop() on the error
   returned.

 - Fix race between reading trace_pipe and updating subbuffer size

   If a user is reading the trace_pipe file at the same time they update
   the ring buffer sub-buffer size, can cause the trace_pipe read to
   read stale data. Add trace_access_lock() around updating the ring
   buffer sub-buffer size.

 - Fix eventfs_inode on failure path in creation of the events directory

   In the creation of the "events" directory, if after allocating the
   eventfs_inode a failure is detected, it calls cleanup_ei() which
   calls free_ei(). The free_ei() will test if eventfs_inode being freed
   has no children. It is a bug if it does. But on the failure case of
   the creation of the "events" directory, the children lists have not
   yet been initialized and the free will trigger a warning because
   list_empty() on an uninitialized list returns false.

   Move the initialization into init_ei() where it makes more sense and
   makes sure that a created eventfs_inode has its lists initialized
   upon creation.

 - Check return value of kthread_run() in ftrace direct sample code

   The sample code that shows how to use the ftrace direct calls does
   not test the return of kthread_run() to see if it succeeds. Return a
   failure if the kthread_run() doesn't succeed.

 - Clear user events state on fork in case of alloc failure

   On fork, the child gets a pointer to the parent's user events state.
   It makes a copy of it then updates the child's pointer to it. But if
   the allocation fails, the duplication function leaves the child with
   a pointer to its parent's descriptor. When the child cleans up its
   data, it will free the parent's descriptor while the parent is still
   using it.

   In the duplication function, set the child's user_event_mm to NULL
   before testing if the allocation succeeded, and when it exits it will
   not free the parent's descriptor.

 - Fix retry exhaustion in simple ring buffer reader swap

   simple_ring_buffer_swap_reader_page() starts with retry set to 8 and
   post-decrements it only after a failed link replacement. On the final
   attempt, a successful replacement leaves retry at zero, while a
   failed replacement leaves it at -1.

   But the check for success expects the retry value to be non-zero and
   exits with an error on zero. This is the opposite result. Fix it.

 - Fail nicely when the remote swap_reader_page() returns an error

   Currently, if the swap_reader_page() of a remote buffer fails, it
   triggers a WARN_ON_ONCE() and continues normally. Instead, have it
   exit with an error and a pr_warn() print instead of a full WARNING.

* tag 'trace-v7.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  ring-buffer: Stop remote reader update when page swap fails
  tracing: Fix retry exhaustion in simple ring buffer reader swap
  tracing/user_events: Clear copied tracing state before fork duplication
  samples/ftrace: Fix kthread_stop() on ERR_PTR in ftrace-direct-multi-modify
  samples/ftrace: Fix kthread_stop() on ERR_PTR in ftrace-direct-modify
  eventfs: Initialize ei->children and ei->list in init_ei()
  tracing: Fix use-after-free in trace_pipe read on sub-buffer order change
  tracing: Fix crash passing ERR_PTR to kthread_stop()
  tracing: Fix use-after-free with same-name named triggers
  tracing: Fix logged instance name on creation failure
2026-08-30 09:22:00 -07:00
..
9p vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
adfs ARM development for 7.1-rc1 2026-04-25 07:44:26 -07:00
affs vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
afs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
autofs autofs: drop redundant S_IFDIR from mkdir 2026-07-01 12:48:44 +02:00
befs befs: handle set_blocksize failures 2026-05-21 13:39:35 +02:00
bfs vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
btrfs for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
cachefiles cachefiles,netfs: sunset ondemand mode 2026-08-12 16:24:26 +02:00
ceph A wide variety of mostly CephFS fixes and cleanups, split between 2026-08-28 11:51:05 -07:00
coda vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
configfs configfs work 2026-06-15 04:28:20 +05:30
cramfs fs: add dedicated block device open helpers for filesystems 2026-06-29 10:31:52 +02:00
crypto fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
debugfs debugfs: warn if file creation failed due to uninitialized debugfs 2026-07-18 16:07:22 +02:00
devpts
dlm dlm: init per node debugfs before add to node hash 2026-05-08 08:38:03 -05:00
ecryptfs eCryptfs updates for 7.3-rc1 2026-08-21 12:32:01 -07:00
efivarfs EFI updates for v7.3 2026-08-23 09:24:34 -07:00
erofs Changes since last update: 2026-08-25 12:27:41 -07:00
exfat This contains a set of nine exfat fixes covering shared writable mappings, 2026-08-22 08:57:28 -07:00
exportfs find_acceptable_alias(): skip NORCU aliases with zero refcount 2026-06-05 00:34:55 -04:00
ext2 \n 2026-08-20 12:52:35 -07:00
ext4 Various ext4 updates for 7.3-rc1, including: 2026-08-20 13:17:11 -07:00
f2fs f2fs-for-7.3-rc1 2026-08-28 10:48:48 -07:00
fat mm.git review status for master..mm-nonmm-stable 2026-08-23 08:07:11 -07:00
fuse fuse update for 7.3 2026-08-25 07:59:44 -07:00
gfs2 gfs2 changes 2026-08-17 17:03:34 -07:00
hfs hfs/hfsplus updates for v7.3 2026-08-17 18:14:32 -07:00
hfsplus hfs/hfsplus updates for v7.3 2026-08-17 18:14:32 -07:00
hostfs Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
hpfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
hugetlbfs mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
iomap for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
isofs isofs: Drop support of directory entries straddling blocks 2026-07-29 11:18:57 +02:00
jbd2 ext4: enable scoped NOFS when starting a handle in nojournal mode 2026-07-22 23:47:06 -04:00
jffs2 vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
jfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
kernfs kernfs: avoid iattr allocation in listxattr 2026-08-15 23:09:10 +02:00
lockd NFS client updates for Linux 7.3 2026-08-26 15:09:21 -07:00
minix vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
netfs netfs: Fix folio_queue ENOMEM in writeback by adding a mempool 2026-07-28 15:42:31 +02:00
nfs mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
nfs_common NFS/localio: fix ref leak on nfs_uuid_add_file failure 2026-08-10 09:54:35 -04:00
nfsd nfsd: export NFSv4 callback op stats via netlink 2026-08-10 09:54:35 -04:00
nilfs2 nilfs2 updates for v7.3 2026-08-17 18:34:43 -07:00
nls
notify fsnotify: Fix stale object mask after concurrent mark updates 2026-08-05 11:50:45 +02:00
ntfs ntfs: support resident WOF decompression 2026-08-21 19:09:00 +09:00
ntfs3 Changes for 7.3-rc1 2026-08-20 12:27:02 -07:00
ocfs2 mm.git review status for master..mm-nonmm-stable 2026-08-23 08:07:11 -07:00
omfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
openpromfs
orangefs Fixes: 2026-08-20 12:36:26 -07:00
overlayfs vfs-7.3-rc1.ovl 2026-08-17 13:38:36 -07:00
proc mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
pstore mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
qnx4 qnx4: handle set_blocksize failures 2026-05-21 13:39:35 +02:00
qnx6 fs/qnx6: fix pointer arithmetic in directory iteration 2026-05-28 14:16:33 +02:00
quota quota: remove CONFIG_PRINT_QUOTA_WARNING code 2026-07-27 21:53:43 +02:00
ramfs mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
resctrl fs/resctrl: Inform user space when status buffer overflowed 2026-07-26 21:40:26 -07:00
romfs vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
smb mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
squashfs squashfs: avoid thundering-herd cache wakeups 2026-08-19 19:55:06 -07:00
sysfs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
tests
tracefs eventfs: Initialize ei->children and ei->list in init_ei() 2026-08-24 16:42:57 -04:00
ubifs This pull request contains updates for UBI and UBIFS: 2026-08-28 10:59:07 -07:00
udf \n 2026-08-20 12:52:35 -07:00
ufs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
unicode unicode: Properly reject invalid encoding version strings 2026-07-31 16:33:14 -04:00
vboxsf Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
verity fsverity: Fix silent truncation in bpf_get_fsverity_digest() 2026-08-04 09:24:23 +02:00
xfs for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
zonefs zonefs: convert iomap ops to ->iomap_next() 2026-07-31 12:28:50 +02:00
aio.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
anon_inodes.c libfs: drop redundant SB_I_NOEXEC/SB_I_NODEV in init_pseudo() callers 2026-06-04 10:10:49 +02:00
attr.c fs,fsverity: remove check for fsverity being enabled in setattr_prepare() 2026-07-28 21:25:03 -07:00
backing-file.c fs: fix user path of nested backing files 2026-08-12 11:36:40 +02:00
bad_inode.c Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
binfmt_elf_fdpic.c binfmt_elf_fdpic: consume a stashed PT_INTERP substitute 2026-08-03 10:08:46 +02:00
binfmt_elf.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
binfmt_flat.c
binfmt_misc_bpf.c binfmt_misc: let a 'B' entry bind its interpreters 2026-08-03 19:15:44 +02:00
binfmt_misc.c vfs-7.3-rc1.binfmt 2026-08-17 08:35:25 -07:00
binfmt_script.c
bpf_fs_kfuncs.c vfs-7.3-rc1.kfunc 2026-08-17 11:02:10 -07:00
buffer.c for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c coredump: use scoped_with_init_fs() for coredump path resolution 2026-06-29 10:44:08 +02:00
d_path.c fs: add failfs 2026-07-27 17:17:59 +02:00
dax.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
dcache.c dcache: keep shrink_dcache_for_umount() making progress on busy roots 2026-07-31 10:46:02 +02:00
direct-io.c direct-io: remove IOCB_NOWAIT support 2026-05-26 11:01:55 -06:00
drop_caches.c
eventfd.c
eventpoll.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
exec.c Miscellaneous futex fixes: 2026-08-22 16:29:20 -07:00
failfs.c fs: support FD_FAILFS_ROOT in fchdir() 2026-07-27 17:17:59 +02:00
fcntl.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
fhandle.c fhandle: reject detached mounts in capable_wrt_mount() 2026-07-01 15:26:32 +02:00
file_attr.c fs: Add case sensitivity flags to file_kattr 2026-05-11 16:50:27 +02:00
file_table.c dentry memory safety stuff 2026-06-15 04:15:31 +05:30
file.c fs: retire stale comment in fget_task_next() 2026-05-28 14:27:00 +02:00
filesystems.c fs: fix switch/case indentation in sysfs() syscall 2026-08-12 11:36:40 +02:00
fs_context.c vfs-7.1-rc1.misc 2026-04-13 14:20:11 -07:00
fs_dirent.c
fs_parser.c
fs_pin.c
fs_struct.c fs: stop rewriting paths for PF_EXITING | PF_DUMPCORE 2026-06-29 10:54:43 +02:00
fs-writeback.c for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
fserror.c
fsopen.c
init.c
inode.c fs: remove stale inode_insert5() kernel-doc parameter 2026-08-12 11:36:40 +02:00
internal.h vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
ioctl.c
Kconfig vfs-7.3-rc1.efs 2026-08-17 08:55:58 -07:00
Kconfig.binfmt binfmt_misc: add binfmt_misc_ops bpf struct_ops 2026-08-03 10:08:41 +02:00
kernel_read_file.c fs: use scoped_with_init_fs() for kernel_read_file_from_path_initns() 2026-06-29 10:44:09 +02:00
libfs.c fs: Provide way for filesystem to wait for metadata writeback 2026-07-27 16:25:32 +02:00
locks.c filelock: add an inode_lease_ignore_mask helper 2026-05-15 19:24:32 +02:00
Makefile vfs-7.3-rc1.failfs 2026-08-17 09:15:52 -07:00
mbcache.c vfs-7.1-rc1.misc 2026-04-13 14:20:11 -07:00
mnt_idmapping.c fs/statmount: fix slab out-of-bounds write in statmount_mnt_idmap 2026-05-11 14:19:01 +02:00
mount.h vfs-7.2-rc1.procfs 2026-06-15 04:07:58 +05:30
mpage.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
namei.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
namespace.c vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
nsfs.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
nullfs.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
open.c fs: support FD_FAILFS_ROOT in fchroot() 2026-07-27 17:18:00 +02:00
pidfs.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
pipe.c Summary 2026-08-20 08:46:41 -07:00
pnode.c
pnode.h
posix_acl.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
proc_namespace.c fs: add real_fs to track task's actual fs_struct 2026-06-29 10:43:45 +02:00
read_write.c fs/read_write: Do not export __kernel_write() to the entire world 2026-06-05 14:46:20 +02:00
readdir.c fs: Replace user_access_{begin/end} by scoped user access 2026-03-24 14:44:02 +01:00
remap_range.c
select.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
seq_file.c seq_file: rename mangle_path to seq_mangle_path 2026-07-31 10:09:14 +02:00
signalfd.c
splice.c
stack.c
stat.c fs: annotate inode timestamp accessors 2026-07-31 10:09:11 +02:00
statfs.c
super.c vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
sync.c sync_file_range: delete dead S_ISLNK code 2026-05-21 13:39:36 +02:00
sysctls.c
timerfd.c fs/timerfd: Use the new alarm/hrtimer functions 2026-05-01 21:36:13 +02:00
utimes.c
xattr.c lsm/stable-7.2 PR 20260615 2026-06-17 12:34:16 +01:00