Skip to content

Commit b6a878b

Browse files
committed
smb3: missing lock when picking channel
jira LE-4669 cve CVE-2024-35999 Rebuild_History Non-Buildable kernel-4.18.0-553.82.1.el8_10 commit-author Steve French <stfrench@microsoft.com> commit 8094a60 Coverity spotted a place where we should have been holding the channel lock when accessing the ses channel index. Addresses-Coverity: 1582039 ("Data race condition (MISSING_LOCK)") Cc: stable@vger.kernel.org Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> (cherry picked from commit 8094a60) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent f810843 commit b6a878b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/cifs/transport.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,9 +1058,11 @@ struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses)
10581058
if (CIFS_CHAN_NEEDS_RECONNECT(ses, index))
10591059
goto pick_another;
10601060
}
1061+
1062+
server = ses->chans[index].server;
10611063
spin_unlock(&ses->chan_lock);
10621064

1063-
return ses->chans[index].server;
1065+
return server;
10641066
}
10651067

10661068
int

0 commit comments

Comments
 (0)