]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:44:46 +0000 (06:44 -0700)
commitf325bfb738da5fbddb9c9bc70cf13a00ef2a74af
treeb79310b0ad992c3f41a4d2a9a7e62226c8e69bcf
parente932248f0e61c220772ffe36e7de226daad20986
cifs: fix credits leak for SMB1 oplock breaks

commit d69cb728e70c40268762182a62f5d5d6fa51c5b2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/transport.c