提交 e3ee9fb2 编写于 作者: S Steve French

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: 73f9bfbe ("cifs: maintain a state machine for tcp/smb/tcon sessions")
Reported-by: NRonnie Sahlberg <lsahlber@redhat.com>
Acked-by: NRonnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: NShyam Prasad N <sprasad@microsoft.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 09688c01
......@@ -3924,7 +3924,8 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
/* only send once per connect */
spin_lock(&cifs_tcp_ses_lock);
if (server->tcpStatus != CifsNeedSessSetup) {
if ((server->tcpStatus != CifsNeedSessSetup) &&
(ses->status == CifsGood)) {
spin_unlock(&cifs_tcp_ses_lock);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册