This is a note to let you know that I've just added the patch titled cifs: use DFS root session instead of tcon ses to the 6.2-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: cifs-use-dfs-root-session-instead-of-tcon-ses.patch and it can be found in the queue-6.2 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6284e46bdd47743a064fe6ac834a7ac05b1fd206 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara <pc@xxxxxxxxxxxxx> Date: Tue, 14 Mar 2023 20:32:56 -0300 Subject: cifs: use DFS root session instead of tcon ses From: Paulo Alcantara <pc@xxxxxxxxxxxxx> commit 6284e46bdd47743a064fe6ac834a7ac05b1fd206 upstream. Use DFS root session whenever possible to get new DFS referrals otherwise we might end up with an IPC tcon (tcon->ses->tcon_ipc) that doesn't respond to them. It should be safe accessing @ses->dfs_root_ses directly in cifs_inval_name_dfs_link_error() as it has same lifetime as of @tcon. Signed-off-by: Paulo Alcantara (SUSE) <pc@xxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx # 6.2 Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/cifs/misc.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -1364,6 +1364,7 @@ int cifs_inval_name_dfs_link_error(const * removing cached DFS targets that the client would eventually * need during failover. */ + ses = CIFS_DFS_ROOT_SES(ses); if (ses->server->ops->get_dfs_refer && !ses->server->ops->get_dfs_refer(xid, ses, ref_path, &refs, &num_refs, cifs_sb->local_nls, Patches currently in stable-queue which might be from pc@xxxxxxxxxxxxx are queue-6.2/cifs-fix-smb2_set_path_size.patch queue-6.2/cifs-use-dfs-root-session-instead-of-tcon-ses.patch queue-6.2/cifs-generate-signkey-for-the-channel-that-s-reconnecting.patch queue-6.2/cifs-return-dfs-root-session-id-in-debugdata.patch queue-6.2/cifs-fix-use-after-free-bug-in-refresh_cache_worker.patch queue-6.2/cifs-set-dfs-root-session-in-cifs_get_smb_ses.patch