android_kernel_oneplus_msm8998/fs/fuse
Tahsin Erdogan dc4e372f9a fuse: clear FR_PENDING flag when moving requests out of pending queue
commit a8a86d78d673b1c99fe9b0064739fde9e9774184 upstream.

fuse_abort_conn() moves requests from pending list to a temporary list
before canceling them. This operation races with request_wait_answer()
which also tries to remove the request after it gets a fatal signal. It
checks FR_PENDING flag to determine whether the request is still in the
pending list.

Make fuse_abort_conn() clear FR_PENDING flag so that request_wait_answer()
does not remove the request from temporary list.

This bug causes an Oops when trying to delete an already deleted list entry
in end_requests().

Fixes: ee314a870e ("fuse: abort: no fc->lock needed for request ending")
Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-26 08:23:48 +01:00
..
control.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
cuse.c fuse: Add reference counting for fuse_io_priv 2016-04-12 09:08:58 -07:00
dev.c fuse: clear FR_PENDING flag when moving requests out of pending queue 2017-01-26 08:23:48 +01:00
dir.c fuse: fix killing s[ug]id in setattr 2016-10-22 12:26:55 +02:00
file.c fuse: fix fuse_write_end() if zero bytes were copied 2016-11-26 09:54:52 +01:00
fuse_i.h fuse: Add reference counting for fuse_io_priv 2016-04-12 09:08:58 -07:00
inode.c fuse: fix wrong assignment of ->flags in fuse_send_init() 2016-08-16 09:30:50 +02:00
Kconfig fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig 2013-01-17 13:08:45 +01:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00