CIFS: Reconnect expired SMB sessions
authorPavel Shilovsky <pshilov@microsoft.com>
Sat, 8 Jul 2017 21:32:00 +0000 (14:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 07:35:37 +0000 (09:35 +0200)
commit92d7d3e8670251a13f19c7e2047c24e0a5633c65
tree4fb1d012a9b70672685d2c4150c70d266ad563eb
parent28cbf0693771f89da771637c6824c263a71c1e99
CIFS: Reconnect expired SMB sessions

commit 511c54a2f69195b28afb9dd119f03787b1625bb4 upstream.

According to the MS-SMB2 spec (3.2.5.1.6) once the client receives
STATUS_NETWORK_SESSION_EXPIRED error code from a server it should
reconnect the current SMB session. Currently the client doesn't do
that. This can result in subsequent client requests failing by
the server. The patch adds an additional logic to the demultiplex
thread to identify expired sessions and reconnect them.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsglob.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/smb2ops.c