]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
CIFS: Close open handle after interrupted close
authorPavel Shilovsky <pshilov@microsoft.com>
Thu, 21 Nov 2019 19:35:12 +0000 (11:35 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 13:57:25 +0000 (07:57 -0600)
commit90d9b904ee4cdc197f032b347878a07d87fd7e67
treeb4aba1e9cc5109044a0b326637e9f76b78809581
parentea6ad21a625887e0b5309469a5c171ea89faa0f8
CIFS: Close open handle after interrupted close

BugLink: https://bugs.launchpad.net/bugs/1858427
commit 9150c3adbf24d77cfba37f03639d4a908ca4ac25 upstream.

If Close command is interrupted before sending a request
to the server the client ends up leaking an open file
handle. This wastes server resources and can potentially
block applications that try to remove the file or any
directory containing this file.

Fix this by putting the close command into a worker queue,
so another thread retries it later.

Cc: Stable <stable@vger.kernel.org>
Tested-by: Frank Sorenson <sorenson@redhat.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
fs/cifs/smb2misc.c
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h