]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: client: add proper locking around ses->iface_last_update
authorHenrique Carvalho <henrique.carvalho@suse.com>
Mon, 19 Jan 2026 17:54:45 +0000 (14:54 -0300)
committerSteve French <stfrench@microsoft.com>
Sun, 8 Feb 2026 23:07:43 +0000 (17:07 -0600)
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>
fs/smb/client/connect.c

index ce620503e9f7023fa53eb732fc6007b641eb0f48..60c76375f0f50eaea49788465d93f389e7acf4d7 100644 (file)
@@ -4270,7 +4270,9 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
                ses->ses_status = SES_IN_SETUP;
 
                /* force iface_list refresh */
+               spin_lock(&ses->iface_lock);
                ses->iface_last_update = 0;
+               spin_unlock(&ses->iface_lock);
        }
        spin_unlock(&ses->ses_lock);