Commit 66be5c48 authored by Winston Wen's avatar Winston Wen Committed by Steve French

cifs: fix session state check in smb2_find_smb_ses

Chech the session state and skip it if it's exiting.
Signed-off-by: default avatarWinston Wen <wentao@uniontech.com>
Reviewed-by: default avatarShyam Prasad N <sprasad@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 99f28070
......@@ -153,7 +153,14 @@ smb2_find_smb_ses_unlocked(struct TCP_Server_Info *server, __u64 ses_id)
list_for_each_entry(ses, &pserver->smb_ses_list, smb_ses_list) {
if (ses->Suid != ses_id)
continue;
spin_lock(&ses->ses_lock);
if (ses->ses_status == SES_EXITING) {
spin_unlock(&ses->ses_lock);
continue;
}
++ses->ses_count;
spin_unlock(&ses->ses_lock);
return ses;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment