Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

CIFS: 511c54a2f69195b28afb9dd119f03787b1625bb4 adds a check for session expiry, status STATUS_NETWORK_SESSION_EXPIRED, however the server can also respond with STATUS_USER_SESSION_DELETED in cases where the session has been idle for some time and the server reaps the session to recover resources.

Handle this additional status in the same way as SESSION_EXPIRED.

Signed-off-by: Mark Syms <mark.syms@citrix.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>

authored by

Mark Syms and committed by
Steve French
d81243c6 e4dc31fe

+3 -2
+3 -2
fs/cifs/smb2ops.c
··· 1323 1323 { 1324 1324 struct smb2_sync_hdr *shdr = get_sync_hdr(buf); 1325 1325 1326 - if (shdr->Status != STATUS_NETWORK_SESSION_EXPIRED) 1326 + if (shdr->Status != STATUS_NETWORK_SESSION_EXPIRED && 1327 + shdr->Status != STATUS_USER_SESSION_DELETED) 1327 1328 return false; 1328 1329 1329 - cifs_dbg(FYI, "Session expired\n"); 1330 + cifs_dbg(FYI, "Session expired or deleted\n"); 1330 1331 return true; 1331 1332 } 1332 1333