summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2023-03-10 15:32:01 +0000
committerSteve French <stfrench@microsoft.com>2023-03-14 17:36:49 -0500
commit05ce0448c3f36febd8db0ee0e9e16557f3ab5ee8 (patch)
treea69989fb633da77f1c9f954a6bfad0ebb37a260b /fs/cifs
parent211baef0eabf4169ce4f73ebd917749d1a7edd74 (diff)
downloadlwn-05ce0448c3f36febd8db0ee0e9e16557f3ab5ee8.tar.gz
lwn-05ce0448c3f36febd8db0ee0e9e16557f3ab5ee8.zip
cifs: generate signkey for the channel that's reconnecting
Before my changes to how multichannel reconnects work, the primary channel was always used to do a non-binding session setup. With my changes, that is not the case anymore. Missed this place where channel at index 0 was forcibly updated with the signing key. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Cc: stable@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/smb2transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
index 381babc1212c..d827b7547ffa 100644
--- a/fs/cifs/smb2transport.c
+++ b/fs/cifs/smb2transport.c
@@ -425,7 +425,7 @@ generate_smb3signingkey(struct cifs_ses *ses,
/* safe to access primary channel, since it will never go away */
spin_lock(&ses->chan_lock);
- memcpy(ses->chans[0].signkey, ses->smb3signingkey,
+ memcpy(ses->chans[chan_index].signkey, ses->smb3signingkey,
SMB3_SIGN_KEY_SIZE);
spin_unlock(&ses->chan_lock);