summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Shilovsky2019-07-22 20:34:59 +0200
committerGreg Kroah-Hartman2019-08-16 10:12:52 +0200
commit50831f1a2f570eb7007c60519f21652342f1d07c (patch)
treeea272a56141032f2ebb63bd8af5f8ffa22fc91fd /fs
parentdax: dax_layout_busy_page() should not unmap cow pages (diff)
downloadkernel-qcow2-linux-50831f1a2f570eb7007c60519f21652342f1d07c.tar.gz
kernel-qcow2-linux-50831f1a2f570eb7007c60519f21652342f1d07c.tar.xz
kernel-qcow2-linux-50831f1a2f570eb7007c60519f21652342f1d07c.zip
SMB3: Fix deadlock in validate negotiate hits reconnect
commit e99c63e4d86d3a94818693147b469fa70de6f945 upstream. Currently we skip SMB2_TREE_CONNECT command when checking during reconnect because Tree Connect happens when establishing an SMB session. For SMB 3.0 protocol version the code also calls validate negotiate which results in SMB2_IOCL command being sent over the wire. This may deadlock on trying to acquire a mutex when checking for reconnect. Fix this by skipping SMB2_IOCL command when doing the reconnect check. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/smb2pdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index c181f1621e1a..55502bb6dee8 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -168,7 +168,7 @@ smb2_reconnect(__le16 smb2_command, struct cifs_tcon *tcon)
if (tcon == NULL)
return 0;
- if (smb2_command == SMB2_TREE_CONNECT)
+ if (smb2_command == SMB2_TREE_CONNECT || smb2_command == SMB2_IOCTL)
return 0;
if (tcon->tidStatus == CifsExiting) {