linux-stable/fs/fuse
Miklos Szeredi f1ebdeffc6 fuse: fix leak of fuse_io_priv
exit_aio() is sometimes stuck in wait_for_completion() after aio is issued
with direct IO and the task receives a signal.

The reason is failure to call ->ki_complete() due to a leaked reference to
fuse_io_priv.  This happens in fuse_async_req_send() if
fuse_simple_background() returns an error (e.g. -EINTR).

In this case the error value is propagated via io->err, so return success
to not confuse callers.

This issue is tracked as a virtio-fs issue:
https://gitlab.com/virtio-fs/qemu/issues/14

Reported-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Fixes: 45ac96ed7c ("fuse: convert direct_io to simple api")
Cc: <stable@vger.kernel.org> # v5.4
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2019-11-27 09:33:49 +01:00
..
Kconfig virtio-fs: add virtiofs filesystem 2019-09-18 20:17:50 +02:00
Makefile virtio-fs: Change module name to virtiofs.ko 2019-10-14 10:20:33 +02:00
acl.c fuse: Support fuse filesystems outside of init_user_ns 2018-03-20 17:11:44 +01:00
control.c convenience helper: get_tree_single() 2019-07-04 22:01:58 -04:00
cuse.c fuse: fix memleak in cuse_channel_open 2019-09-24 15:28:01 +02:00
dev.c fuse: don't dereference req->args on finished request 2019-10-21 09:11:40 +02:00
dir.c fuse: verify nlink 2019-11-12 11:49:04 +01:00
file.c fuse: fix leak of fuse_io_priv 2019-11-27 09:33:49 +01:00
fuse_i.h fuse: verify attributes 2019-11-12 11:49:04 +01:00
inode.c virtio-fs: don't show mount options 2019-10-15 16:11:41 +02:00
readdir.c fuse: verify attributes 2019-11-12 11:49:04 +01:00
virtio_fs.c virtiofs: Use completions while waiting for queue to be drained 2019-11-22 13:29:50 +01:00
xattr.c fuse: rearrange and resize fuse_args fields 2019-09-10 16:29:48 +02:00