]> git.itanic.dy.fi Git - linux-stable/commit
fuse: set FR_SENT while locked
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 28 Sep 2018 14:43:22 +0000 (16:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:25:58 +0000 (09:25 +0100)
commitc31ccf1fe8c707ff2c078370c7c87ed794d0a39a
tree693cacf8ba6b24ab9c58893dcffd984dadd00ea2
parent7238fcbd68147fd76a927bfd10cb377d032374bf
fuse: set FR_SENT while locked

commit 4c316f2f3ff315cb48efb7435621e5bfb81df96d upstream.

Otherwise fuse_dev_do_write() could come in and finish off the request, and
the set_bit(FR_SENT, ...) could trigger the WARN_ON(test_bit(FR_SENT, ...))
in request_end().

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reported-by: syzbot+ef054c4d3f64cd7f7cec@syzkaller.appspotmai
Fixes: 46c34a348b0a ("fuse: no fc->lock for pqueue parts")
Cc: <stable@vger.kernel.org> # v4.2
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dev.c