Skip to content

Commit

Permalink
CIFS: 511c54a adds a check for session expiry, status STATUS_NETWORK_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Steve French <[email protected]>
CC: Stable <[email protected]>
  • Loading branch information
MarkSymsCtx authored and Steve French committed Jun 1, 2018
1 parent e4dc31f commit d81243c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/cifs/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,10 +1323,11 @@ smb2_is_session_expired(char *buf)
{
struct smb2_sync_hdr *shdr = get_sync_hdr(buf);

if (shdr->Status != STATUS_NETWORK_SESSION_EXPIRED)
if (shdr->Status != STATUS_NETWORK_SESSION_EXPIRED &&
shdr->Status != STATUS_USER_SESSION_DELETED)
return false;

cifs_dbg(FYI, "Session expired\n");
cifs_dbg(FYI, "Session expired or deleted\n");
return true;
}

Expand Down

0 comments on commit d81243c

Please sign in to comment.