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 <[email protected]> Reviewed-By: Tom Talpey <[email protected]> Cc: <[email protected]> # v5.8+ Signed-off-by: Steve French <[email protected]>
1 parent 679971e commit 9c2dc11

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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)