android_kernel_motorola_sm6375/fs/fuse
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vivek Goyal 2b5e027657 virtiofs: schedule blocking async replies in separate worker
[ Upstream commit bb737bbe48bea9854455cb61ea1dc06e92ce586c ]

In virtiofs (unlike in regular fuse) processing of async replies is
serialized.  This can result in a deadlock in rare corner cases when
there's a circular dependency between the completion of two or more async
replies.

Such a deadlock can be reproduced with xfstests:generic/503 if TEST_DIR ==
SCRATCH_MNT (which is a misconfiguration):

 - Process A is waiting for page lock in worker thread context and blocked
   (virtio_fs_requests_done_work()).
 - Process B is holding page lock and waiting for pending writes to
   finish (fuse_wait_on_page_writeback()).
 - Write requests are waiting in virtqueue and can't complete because
   worker thread is blocked on page lock (process A).

Fix this by creating a unique work_struct for each async reply that can
block (O_DIRECT read).

Fixes: a62a8ef9d9 ("virtio-fs: add virtiofs filesystem")
Signed-off-by: Vivek Goyal <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-06-24 17:50:21 +02:00
..
acl.c
control.c
cuse.c fuse: fix memleak in cuse_channel_open 2019-09-24 15:28:01 +02:00
dev.c fuse: fix stack use after return 2020-03-18 07:17:52 +01:00
dir.c fuse: verify attributes 2019-12-13 08:42:31 +01:00
file.c virtiofs: schedule blocking async replies in separate worker 2020-06-24 17:50:21 +02:00
fuse_i.h virtiofs: schedule blocking async replies in separate worker 2020-06-24 17:50:21 +02:00
inode.c virtio-fs: don't show mount options 2019-10-15 16:11:41 +02: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
readdir.c fuse: verify attributes 2019-12-13 08:42:31 +01:00
virtio_fs.c virtiofs: schedule blocking async replies in separate worker 2020-06-24 17:50:21 +02:00
xattr.c fuse: rearrange and resize fuse_args fields 2019-09-10 16:29:48 +02:00