android_kernel_sony_sdm845/fs/fuse
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Miklos Szeredi 5aae6c46a5 fuse: fix possibly missed wake-up after abort
commit 2d84a2d19b6150c6dbac1e6ebad9c82e4c123772 upstream.

In current fuse_drop_waiting() implementation it's possible that
fuse_wait_aborted() will not be woken up in the unlikely case that
fuse_abort_conn() + fuse_wait_aborted() runs in between checking
fc->connected and calling atomic_dec(&fc->num_waiting).

Do the atomic_dec_and_test() unconditionally, which also provides the
necessary barrier against reordering with the fc->connected check.

The explicit smp_mb() in fuse_wait_aborted() is not actually needed, since
the spin_unlock() in fuse_abort_conn() provides the necessary RELEASE
barrier after resetting fc->connected.  However, this is not a performance
sensitive path, and adding the explicit barrier makes it easier to
document.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: b8f95e5d13f5 ("fuse: umount should wait for all requests")
Cc: <stable@vger.kernel.org> #v4.19
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-02 17:23:15 +02:00
..
acl.c fuse: Add posix ACL support 2016-10-01 07:32:32 +02:00
control.c fuse: use READ_ONCE on congestion_threshold and max_background 2019-11-25 09:53:08 +01:00
cuse.c fuse: fix memleak in cuse_channel_open 2019-10-17 13:42:12 -07:00
dev.c fuse: fix possibly missed wake-up after abort 2020-05-02 17:23:15 +02:00
dir.c fuse: verify attributes 2019-12-21 10:41:30 +01:00
file.c fuse: truncate pending writes on O_TRUNC 2019-11-06 12:18:15 +01:00
fuse_i.h fuse: verify attributes 2019-12-21 10:41:30 +01:00
inode.c fuse: Fix oops at process_init_reply() 2018-09-05 09:20:08 +02:00
Kconfig fuse: Add posix ACL support 2016-10-01 07:32:32 +02:00
Makefile fuse: Use generic xattr ops 2016-10-01 07:32:32 +02:00
xattr.c fuse: limit xattr returned size 2016-10-03 11:06:05 +02:00