]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: cifs_chan_is_iface_active should be called with chan_lock held
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 29 Dec 2023 11:16:15 +0000 (11:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jan 2024 16:10:21 +0000 (17:10 +0100)
commit5982a625fc0d56ed5ad4b02f88cb3d1ae432460e
tree3e9c00bd83cea575bf02d621998b24413fcdfeff
parent4afcb82518b9b0a07551734662b770513bf0a9ba
cifs: cifs_chan_is_iface_active should be called with chan_lock held

commit 7257bcf3bdc785eabc4eef1f329a59815b032508 upstream.

cifs_chan_is_iface_active checks the channels of a session to see
if the associated iface is active. This should always happen
with chan_lock held. However, these two callers of this function
were missing this locking.

This change makes sure the function calls are protected with
proper locking.

Fixes: b54034a73baf ("cifs: during reconnect, update interface if necessary")
Fixes: fa1d0508bdd4 ("cifs: account for primary channel in the interface list")
Cc: stable@vger.kernel.org
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/connect.c
fs/smb/client/smb2ops.c