Skip to content

Commit

Permalink
smb3: do not attempt multichannel to server which does not support it
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Steve French committed May 8, 2021
1 parent 679971e commit 9c2dc11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ int cifs_try_adding_channels(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses)
return 0;
}

if (!(ses->server->capabilities & SMB2_GLOBAL_CAP_MULTI_CHANNEL)) {
cifs_dbg(VFS, "server %s does not support multichannel\n", ses->server->hostname);
ses->chan_max = 1;
return 0;
}

/*
* Make a copy of the iface list at the time and use that
* instead so as to not hold the iface spinlock for opening
Expand Down

0 comments on commit 9c2dc11

Please sign in to comment.