summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-03-15 02:32:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-22 15:38:02 +0300
commitea4804fb5f25e617114d4235b41aee2501115632 (patch)
treef12b66f716267679c01fc60fba314e4a0157ff79 /fs
parentdd83d228ef47c1fe1617044653865d960ac67fab (diff)
downloadlinux-ea4804fb5f25e617114d4235b41aee2501115632.tar.xz
cifs: use DFS root session instead of tcon ses
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@manguebit.com> Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/misc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 855cc523de25..9f4486b705d5 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -1364,6 +1364,7 @@ int cifs_inval_name_dfs_link_error(const unsigned int xid,
* 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,