fuse: fix initial parallel dirops
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 26 Jul 2018 14:13:11 +0000 (16:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:20:08 +0000 (09:20 +0200)
commit68fbfcb7cd4375889bb000d181dcf46aa45d06a9
tree6736b5ee71622416ed2eb318241335288d9d0568
parent67a9e4870ce1afcb66d314c57ca839aff421557e
fuse: fix initial parallel dirops

commit 63576c13bd17848376c8ba4a98f5d5151140c4ac upstream.

If parallel dirops are enabled in FUSE_INIT reply, then first operation may
leave fi->mutex held.

Reported-by: syzbot <syzbot+3f7b29af1baa9d0a55be@syzkaller.appspotmail.com>
Fixes: 5c672ab3f0ee ("fuse: serialize dirops by default")
Cc: <stable@vger.kernel.org> # v4.7
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/inode.c