]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: fix credits leak for SMB1 oplock breaks
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 1 May 2019 02:03:41 +0000 (12:03 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 8 May 2019 04:24:55 +0000 (23:24 -0500)
commita766d6c2e04f210657c728b02cac654d91aacabc
tree875d356df74e9773969aa9dd03adbf78cf6511e3
parent538d863f42779b8d747895527d9469a8d23af401
cifs: fix credits leak for SMB1 oplock breaks

For SMB1 oplock breaks we would grab one credit while sending the PDU
but we would never relese the credit back since we will never receive a
response to this from the server. Eventuallt this would lead to a hang
once all credits are leaked.

Fix this by defining a new flag CIFS_NO_SRV_RSP which indicates that there
is no server response to this command and thus we need to add any credits back
immediately after sending the PDU.

CC: Stable <stable@vger.kernel.org> #v5.0+
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/transport.c