]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: fix potential race in cifs_put_tcon()
authorPaulo Alcantara <pc@manguebit.com>
Fri, 6 Dec 2024 14:49:07 +0000 (11:49 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 19:03:19 +0000 (20:03 +0100)
commit0d8658c0cb599a5a2de809f88e335072c38d463d
treeab1e15a03b3c6744b96eeb3f48201dc4ec2ac408
parent0e421cb8085cc50264759e37baacd4b8b827ccbc
smb: client: fix potential race in cifs_put_tcon()

[ Upstream commit c32b624fa4f7ca5a2ff217a0b1b2f1352bb4ec11 ]

dfs_cache_refresh() delayed worker could race with cifs_put_tcon(), so
make sure to call list_replace_init() on @tcon->dfs_ses_list after
kworker is cancelled or finished.

Fixes: 4f42a8b54b5c ("smb: client: fix DFS interlink failover")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/connect.c