linux/fs/fuse
Miklos Szeredi 68ca1b49e4 fuse: fix root lookup with nonzero generation
The root inode has a fixed nodeid and generation (1, 0).

Prior to the commit 15db16837a ("fuse: fix illegal access to inode with
reused nodeid") generation number on lookup was ignored.  After this commit
lookup with the wrong generation number resulted in the inode being
unhashed.  This is correct for non-root inodes, but replacing the root
inode is wrong and results in weird behavior.

Fix by reverting to the old behavior if ignoring the generation for the
root inode, but issuing a warning in dmesg.

Reported-by: Antonio SJ Musumeci <trapexit@spawn.link>
Closes: https://lore.kernel.org/all/CAOQ4uxhek5ytdN8Yz2tNEOg5ea4NkBb4nk0FGPjPk_9nz-VG3g@mail.gmail.com/
Fixes: 15db16837a ("fuse: fix illegal access to inode with reused nodeid")
Cc: <stable@vger.kernel.org> # v5.14
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2024-03-05 13:40:42 +01:00
..
acl.c
control.c fuse: convert to new timestamp accessors 2023-10-18 14:08:21 +02:00
cuse.c
dax.c fuse: dax: set fc->dax to NULL in fuse_dax_conn_free() 2023-12-04 10:16:53 +01:00
dev.c fuse: implement ioctls to manage backing files 2024-03-05 13:40:36 +01:00
dir.c fuse: fix root lookup with nonzero generation 2024-03-05 13:40:42 +01:00
file.c fuse: implement passthrough for mmap 2024-03-05 13:40:42 +01:00
fuse_i.h fuse: implement passthrough for mmap 2024-03-05 13:40:42 +01:00
inode.c fuse: implement ioctls to manage backing files 2024-03-05 13:40:36 +01:00
ioctl.c
iomode.c fuse: implement open in passthrough mode 2024-03-05 13:40:42 +01:00
Kconfig fuse: introduce FUSE_PASSTHROUGH capability 2024-02-23 17:36:32 +01:00
Makefile fuse: introduce FUSE_PASSTHROUGH capability 2024-02-23 17:36:32 +01:00
passthrough.c fuse: implement passthrough for mmap 2024-03-05 13:40:42 +01:00
readdir.c fuse: convert to new timestamp accessors 2023-10-18 14:08:21 +02:00
virtio_fs.c virtiofs: drop __exit from virtio_fs_sysfs_exit() 2024-03-05 13:40:42 +01:00
xattr.c fuse: move fuse_xattr_handlers to .rodata 2023-10-09 16:24:18 +02:00