]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
SMB3: Fix deadlock in validate negotiate hits reconnect
authorPavel Shilovsky <pshilov@microsoft.com>
Mon, 22 Jul 2019 18:34:59 +0000 (11:34 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commit5d9e8fd6eebcbee73329bf26f804ad35a703248a
tree66c425bc15fbc2d91dcc36bb46c897801616861d
parentedcb4f29dd2834964c69df74780e99c45949c546
SMB3: Fix deadlock in validate negotiate hits reconnect

BugLink: https://bugs.launchpad.net/bugs/1840520
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/cifs/smb2pdu.c