This is a note to let you know that I've just added the patch titled cifs: return DFS root session id in DebugData 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-return-dfs-root-session-id-in-debugdata.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 f446a630802f154ef0087771683bd4f8e9d08384 Mon Sep 17 00:00:00 2001 From: Paulo Alcantara <pc@xxxxxxxxxxxxx> Date: Tue, 14 Mar 2023 20:32:55 -0300 Subject: cifs: return DFS root session id in DebugData From: Paulo Alcantara <pc@xxxxxxxxxxxxx> commit f446a630802f154ef0087771683bd4f8e9d08384 upstream. Return the DFS root session id in /proc/fs/cifs/DebugData to make it easier to track which IPC tcon was used to get new DFS referrals for a specific connection, and aids in debugging. A simple output of it would be Sessions: 1) Address: 192.168.1.13 Uses: 1 Capability: 0x300067 Session Status: 1 Security type: RawNTLMSSP SessionId: 0xd80000000009 User: 0 Cred User: 0 DFS root session id: 0x128006c000035 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/cifs_debug.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -419,6 +419,11 @@ skip_rdma: from_kuid(&init_user_ns, ses->linux_uid), from_kuid(&init_user_ns, ses->cred_uid)); + if (ses->dfs_root_ses) { + seq_printf(m, "\n\tDFS root session id: 0x%llx", + ses->dfs_root_ses->Suid); + } + spin_lock(&ses->chan_lock); if (CIFS_CHAN_NEEDS_RECONNECT(ses, 0)) seq_puts(m, "\tPrimary channel: DISCONNECTED "); 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