]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: do not let cifs_chan_update_iface deallocate channels
authorShyam Prasad N <sprasad@microsoft.com>
Fri, 15 Dec 2023 17:16:56 +0000 (17:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:34 +0000 (15:28 +0200)
commitdb3a3e6fa33e4bb6eb517ffa52a1a7d3bf37bc24
tree72eca23409385c869c234424267d38bdaddf4030
parent66c2940c9614ffc7f022f3ae294411ca7cf122c8
cifs: do not let cifs_chan_update_iface deallocate channels

[ Upstream commit 12d1e301bdfd1f2e2f371432dedef7cce8f01c4a ]

cifs_chan_update_iface is meant to check and update the server
interface used for a channel when the existing server interface
is no longer available.

So far, this handler had the code to remove an interface entry
even if a new candidate interface is not available. Allowing
this leads to several corner cases to handle.

This change makes the logic much simpler by not deallocating
the current channel interface entry if a new interface is not
found to replace it with.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Stable-dep-of: 16a57d768111 ("cifs: reduce warning log level for server not advertising interfaces")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/sess.c