kernel-fxtec-pro1x/fs/fuse
Miklos Szeredi 18cd6106cf 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: b8f95e5d13 ("fuse: umount should wait for all requests")
Cc: <stable@vger.kernel.org> #v4.19
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:19:24 +01:00
..
acl.c fuse: Support fuse filesystems outside of init_user_ns 2018-03-20 17:11:44 +01:00
control.c fuse: fix control dir setup and teardown 2018-05-31 12:26:10 +02:00
cuse.c fuse: Support fuse filesystems outside of init_user_ns 2018-03-20 17:11:44 +01:00
dev.c fuse: fix possibly missed wake-up after abort 2018-11-21 09:19:24 +01:00
dir.c fuse update for 4.19 2018-08-21 18:47:36 -07:00
file.c fuse: fix use-after-free in fuse_direct_IO() 2018-11-21 09:19:23 +01:00
fuse_i.h fuse: fix initial parallel dirops 2018-07-26 16:13:11 +02:00
inode.c fuse: convert last timespec use to timespec64 2018-07-26 16:13:12 +02:00
Kconfig
Makefile
xattr.c fuse: Ensure posix acls are translated outside of init_user_ns 2018-05-31 12:26:10 +02:00