Skip to content
/ linux Public

Commit 8ce4da0

Browse files
hac-vSasha Levin
authored andcommitted
smb: client: add proper locking around ses->iface_last_update
[ Upstream commit e97dcac ] There is a missing ses->iface_lock in cifs_setup_session, around ses->iface_last_update. Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 66c7c23 commit 8ce4da0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/smb/client/connect.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4287,7 +4287,9 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
42874287
ses->ses_status = SES_IN_SETUP;
42884288

42894289
/* force iface_list refresh */
4290+
spin_lock(&ses->iface_lock);
42904291
ses->iface_last_update = 0;
4292+
spin_unlock(&ses->iface_lock);
42914293
}
42924294
spin_unlock(&ses->ses_lock);
42934295

0 commit comments

Comments
 (0)