]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
CIFS: fix deadlock in cached root handling
authorAurelien Aptel <aaptel@suse.com>
Wed, 17 Jul 2019 10:46:28 +0000 (12:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:54 +0000 (09:12 +0200)
commitcfaa753a5de42f0263497822d89955c284158a97
tree83eeaa02006ea75daeacb3272274c7bc9c78d2df
parentbe5bc9daadec9ac656d04a8de34a0368607cdff0
CIFS: fix deadlock in cached root handling

commit 7e5a70ad88b1e6f6d9b934b2efb41afff496820f upstream.

Prevent deadlock between open_shroot() and
cifs_mark_open_files_invalid() by releasing the lock before entering
SMB2_open, taking it again after and checking if we still need to use
the result.

Link: https://lore.kernel.org/linux-cifs/684ed01c-cbca-2716-bc28-b0a59a0f8521@prodrive-technologies.com/T/#u
Fixes: 3d4ef9a15343 ("smb3: fix redundant opens on root")
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2ops.c