linux/fs/fuse
Luis Henriques d55011469b
fuse: fix possible deadlock if rings are never initialized
When mounting a user-space filesystem using io_uring, the initialization
of the rings is done separately in the server side.  If for some reason
(e.g. a server bug) this step is not performed it will be impossible to
unmount the filesystem if there are already requests waiting.

This issue is easily reproduced with the libfuse passthrough_ll example,
if the queue depth is set to '0' and a request is queued before trying to
unmount the filesystem.  When trying to force the unmount, fuse_abort_conn()
will try to wake up all tasks waiting in fc->blocked_waitq, but because the
rings were never initialized, fuse_uring_ready() will never return 'true'.

Fixes: 3393ff964e ("fuse: block request allocation until io-uring init is complete")
Signed-off-by: Luis Henriques <luis@igalia.com>
Link: https://lore.kernel.org/r/20250306111218.13734-1-luis@igalia.com
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-03-19 14:00:11 +01:00
..
Kconfig fuse: {io-uring} Handle SQEs - register commands 2025-01-24 11:54:08 +01:00
Makefile fuse: {io-uring} Handle SQEs - register commands 2025-01-24 11:54:08 +01:00
acl.c
control.c
cuse.c
dax.c fuse: make args->in_args[0] to be always the header 2025-01-24 11:54:02 +01:00
dev.c fuse: fix possible deadlock if rings are never initialized 2025-03-19 14:00:11 +01:00
dev_uring.c fuse: fix uring race condition for null dereference of fc 2025-03-19 09:24:03 +01:00
dev_uring_i.h fuse: {io-uring} Prevent mount point hang on fuse-server termination 2025-01-27 18:02:21 +01:00
dir.c fuse: don't truncate cached, mutated symlink 2025-02-20 15:48:17 +01:00
file.c fuse: revert back to __readahead_folio() for readahead 2025-02-14 10:49:23 +01:00
fuse_dev_i.h fuse: {io-uring} Make fuse_dev_queue_{interrupt,forget} non-static 2025-01-27 18:01:22 +01:00
fuse_i.h fuse: block request allocation until io-uring init is complete 2025-01-27 18:02:23 +01:00
fuse_trace.h
inode.c fuse: block request allocation until io-uring init is complete 2025-01-27 18:02:23 +01:00
ioctl.c
iomode.c
passthrough.c
readdir.c
sysctl.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
virtio_fs.c
xattr.c fuse: make args->in_args[0] to be always the header 2025-01-24 11:54:02 +01:00