Centos-kernel-stream-9/fs
Alex Markuze 5707b2f168 ceph: fix client race condition where r_parent becomes stale before sending message
JIRA: https://issues.redhat.com/browse/RHEL-109212

Conflicts: Missing 5995d90d2d19f some surrounding APIs are different

commit bec324f33d1ed346394b2eee25bf6dbf3511f727
Author: Alex Markuze <amarkuze@redhat.com>
Date:   Tue Aug 12 09:57:39 2025 +0000

    ceph: fix race condition where r_parent becomes stale before sending message

    When the parent directory's i_rwsem is not locked, req->r_parent may become
    stale due to concurrent operations (e.g. rename) between dentry lookup and
    message creation. Validate that r_parent matches the encoded parent inode
    and update to the correct inode if a mismatch is detected.

    [ idryomov: folded a follow-up fix from Alex to drop extra reference
      from ceph_get_reply_dir() in ceph_fill_trace():

      ceph_get_reply_dir() may return a different, referenced inode when
      r_parent is stale and the parent directory lock is not held.
      ceph_fill_trace() used that inode but failed to drop the reference
      when it differed from req->r_parent, leaking an inode reference.

      Keep the directory inode in a local variable and iput() it at
      function end if it does not match req->r_parent. ]

    Cc: stable@vger.kernel.org
    Signed-off-by: Alex Markuze <amarkuze@redhat.com>
    Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

Signed-off-by: Alex Markuze <amarkuze@redhat.com>
2025-09-11 10:36:12 +00:00
..
9p filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
adfs
affs
afs filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
autofs
befs
bfs
btrfs fs: claw back a few FMODE_* bits 2025-07-11 07:21:34 -04:00
cachefiles
ceph ceph: fix client race condition where r_parent becomes stale before sending message 2025-09-11 10:36:12 +00:00
coda
configfs
cramfs
crypto crypto,fs: Separate out hkdf_extract() and hkdf_expand() 2025-05-09 07:27:10 +02:00
debugfs debugfs: Return error during {full/open}_proxy_open() on rmmod 2025-06-12 16:47:14 -03:00
devpts
dlm Merge: fs: dlm: handle -EINVAL as log_error() 2025-08-12 13:50:16 -03:00
ecryptfs
efivarfs efi: vars: Don't drop lock in the middle of efivar_init() 2025-04-27 20:27:33 -04:00
efs
erofs
exfat
exportfs
ext2
ext4 Merge: CVE-2025-22121: ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all() 2025-08-13 15:39:55 -07:00
f2fs
fat
freevxfs
fscache
fuse filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
gfs2 Merge: gfs2: No more self recovery 2025-08-18 07:20:29 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs Merge: idmapped mount support for hugetlbfs 2025-05-14 12:37:27 -03:00
iomap kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2025-08-19 20:06:24 -03:00
isofs
jbd2 jbd2: remove redundant assignement to variable err 2025-04-08 11:15:14 -04:00
jffs2
jfs
kernfs tmpfs,xattr: enable limited user extended attributes 2025-05-29 14:43:36 +08:00
lockd NLM/NFSD: Fix lock notifications for async-capable filesystems 2025-07-11 07:21:56 -04:00
minix
netfs
nfs Merge: NFS: Fixup allocation flags for nfsiod's __GFP_NORETRY 2025-08-18 07:24:23 -07:00
nfs_common filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
nfsd Merge: fsnotify: update to upstream (v6.7) 2025-07-21 18:52:59 -03:00
nilfs2
nls
notify fanotify: limit reporting of event with non-decodeable file handles 2025-07-07 17:32:19 +02:00
ntfs
ocfs2 gfs2/ocfs2: set FOP_ASYNC_LOCK 2025-07-11 07:21:55 -04:00
omfs
openpromfs
orangefs filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
overlayfs ovl: remove unused forward declaration 2025-06-23 10:16:37 +02:00
proc Merge: mm: fix the inaccurate memory statistics issue for users 2025-07-21 18:52:59 -03:00
pstore pstore: Add priv field to pstore_record for backend specific use 2025-04-27 20:27:33 -04:00
qnx4
qnx6
quota
ramfs
reiserfs
romfs
smb Merge: CIFS: sync with upstream for RHEL 9.7 2025-08-18 07:21:40 -07:00
squashfs Merge: CVE-2024-46744: Squashfs: sanity check symbolic link size 2025-08-18 07:22:05 -07:00
sysfs sysfs: introduce callback attribute_group::bin_size 2025-06-10 14:30:07 -04:00
sysv
tracefs
ubifs
udf udf: Fix a slab-out-of-bounds write bug in udf_find_entry() 2025-06-23 13:18:42 +00:00
ufs
unicode kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2025-08-19 20:06:24 -03:00
vboxsf
verity
xfs kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2025-08-19 20:06:24 -03:00
zonefs
Kconfig tmpfs,xattr: enable limited user extended attributes 2025-05-29 14:43:36 +08:00
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
bpf_fs_kfuncs.c
buffer.c Merge: kernel hung task hot unplugging SCSI devices under write workload 2025-04-29 18:49:33 -03:00
char_dev.c
compat_binfmt_elf.c
coredump.c
d_path.c
dax.c
dcache.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
fhandle.c
file.c fs/file.c: add fast path in find_next_fd() 2025-06-06 10:41:08 +08:00
file_table.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
filesystems.c
fs-writeback.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fsopen.c
init.c
inode.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
internal.h
ioctl.c
kernel_read_file.c
libfs.c
locks.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
namespace.c Merge: Update overlayfs to v6.7 2025-06-26 10:58:50 -03:00
nsfs.c
open.c Merge: xfs: update rhel9.7 kernel with upstream v6.12 2025-07-28 12:55:32 -03:00
pipe.c
pnode.c
pnode.h
posix_acl.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
proc_namespace.c
read_write.c Merge: xfs: update rhel9.7 kernel with upstream v6.12 2025-07-28 12:55:32 -03:00
readdir.c
remap_range.c vfs: export remap and write check helpers 2025-07-10 21:50:17 -05:00
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
sysctls.c
timerfd.c
userfaultfd.c userfaultfd: move userfaultfd_ctx struct to header file 2025-04-18 08:40:02 -04:00
utimes.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00
xattr.c filelock: move file locking definitions to separate header file 2025-07-11 07:21:33 -04:00