Skip to content

Commit e3ee9fb

Browse files
committed
smb3: fix incorrect session setup check for multiuser mounts
A recent change to how the SMB3 server (socket) and session status is managed regressed multiuser mounts by changing the check for whether session setup is needed to the socket (TCP_Server_info) structure instead of the session struct (cifs_ses). Add additional check in cifs_setup_sesion to fix this. Fixes: 73f9bfb ("cifs: maintain a state machine for tcp/smb/tcon sessions") Reported-by: Ronnie Sahlberg <[email protected]> Acked-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 09688c0 commit e3ee9fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/cifs/connect.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3924,7 +3924,8 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
39243924

39253925
/* only send once per connect */
39263926
spin_lock(&cifs_tcp_ses_lock);
3927-
if (server->tcpStatus != CifsNeedSessSetup) {
3927+
if ((server->tcpStatus != CifsNeedSessSetup) &&
3928+
(ses->status == CifsGood)) {
39283929
spin_unlock(&cifs_tcp_ses_lock);
39293930
return 0;
39303931
}

0 commit comments

Comments
 (0)