]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: clear FR_PENDING flag when moving requests out of pending queue
authorTahsin Erdogan <tahsin@google.com>
Thu, 12 Jan 2017 20:04:04 +0000 (12:04 -0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 13 Jan 2017 11:03:47 +0000 (12:03 +0100)
commit2d405c4c8d8ba6357f28a479f6112629d5f9f592
tree12aaf53834805de16bf1cb6af09aa107695babde
parentf860b361d801aefbaf73e56bea0acfd26ed6e227
fuse: clear FR_PENDING flag when moving requests out of pending queue

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: 9ad85ffc8ed2 ("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>
Cc: <stable@vger.kernel.org> # 4.2+
fs/fuse/dev.c