Skip to content

Commit 9c2dc11

Browse files
committed
smb3: do not attempt multichannel to server which does not support it
We were ignoring CAP_MULTI_CHANNEL in the server response - if the server doesn't support multichannel we should not be attempting it. See MS-SMB2 section 3.2.5.2 Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Reviewed-By: Tom Talpey <tom@talpey.com> Cc: <stable@vger.kernel.org> # v5.8+ Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 679971e commit 9c2dc11

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

fs/cifs/sess.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
9797
return 0;
9898
}
9999

100+
if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
101+
cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
102+
ses->chan_max = 1;
103+
return 0;
104+
}
105+
100106
/*
101107
* Make a copy of the iface list at the time and use that
102108
* instead so as to not hold the iface spinlock for opening

0 commit comments

Comments
 (0)