]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
Handle mismatched open calls
authorSachin Prabhu <sprabhu@redhat.com>
Fri, 3 Mar 2017 23:41:38 +0000 (15:41 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 17 May 2017 16:39:27 +0000 (13:39 -0300)
commit424c727c3cd6c5f1924ee8ccdd28b37c6f856fe2
tree9fed365f3c0e97a13bbc7f02f2fc9d6ed7f80e1e
parent601125a082833500fc4e16a0ac98c3e9bd33e476
Handle mismatched open calls

BugLink: http://bugs.launchpad.net/bugs/1689258
commit 38bd49064a1ecb67baad33598e3d824448ab11ec upstream.

A signal can interrupt a SendReceive call which result in incoming
responses to the call being ignored. This is a problem for calls such as
open which results in the successful response being ignored. This
results in an open file resource on the server.

The patch looks into responses which were cancelled after being sent and
in case of successful open closes the open fids.

For this patch, the check is only done in SendReceive2()

RH-bz: 1403319

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/smb2misc.c
fs/cifs/smb2ops.c
fs/cifs/smb2proto.h
fs/cifs/smb2transport.c
fs/cifs/transport.c