Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2556384pxj; Mon, 10 May 2021 05:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn2lj1IJMcfedKaJl+si4BiEkFE9vIb/SSABIzul9CNlItP4pETjfnPRmyLy5fQklJI/fY X-Received: by 2002:a05:6402:5111:: with SMTP id m17mr29588106edd.343.1620651144217; Mon, 10 May 2021 05:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651144; cv=none; d=google.com; s=arc-20160816; b=zsMrhWmZMja8oXbWtLPGs2eLXUhsg81eUxYtmPnZzpAfB+AT2msjlzmECKuqZpLo4s lolVEbOqUJAi1pBfNlY1GDD9ta1ULQp2UNdjX2FZJ+X04jcyKt8/Rew3fPkdW5ZgR64a naaMRgwjbB4bcQqxJxEhbvC4u9wH7ftTprGgD04yhUSymapziSVzf9m8V3QzjKgbjH9g Ou0To4CoqRcHqBIoGZtl3Lg7hlglbeV19tW5g28HkndQ1v27Kd0g1Jbjw2q4J7rMoC/J 9OI3GGoVcrsBGQYjvl47FxutzgnDJNGJcb62y39YmQmB22tofB14wNpsVzxWVPyL/A6K 0C1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vU6J0iuozzEQWCrhoa7HHJiob3d3t+0MXLVxH+gX7Rw=; b=R6Ry7yuPdqnUdYkuEHadk3/D6L89dr9JuUWAWnA+msQhedRJ9dvpA1/sVeo0HERFoC /MLY0BsXe5qIt7KFr8VfkmJ99axKWhBOFkDEIGwpgK6f353vHCUA99i4kIApKUlkh3ID UKMgu2HZ47IEaumv9pb4Z7x9VN96BEuE2wx7OU8ZdKz4mFErdWIo/TvFt2R80HWNg1vd x+nQjjd/1TCgGwnhtgx45mViARNVv0xLeda3cfKwnhwuzb/s7fxqTYmaw+cEybTxvLku +ECDnCsz/BnykrJYBgROJ290pY5bnm0Q/II0oH1tQ98fmKQSRRYikXzO97c6b8bb0qEx vLqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="qbe8/cfE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds10si16762453ejc.709.2021.05.10.05.52.00; Mon, 10 May 2021 05:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="qbe8/cfE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348925AbhEJMrq (ORCPT + 99 others); Mon, 10 May 2021 08:47:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:60432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235324AbhEJLOR (ORCPT ); Mon, 10 May 2021 07:14:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 226626101E; Mon, 10 May 2021 11:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620645053; bh=DSD6YYvZ0+XAhO+Nujk7EHWrzJzjyk4XXWrkdsUiQv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qbe8/cfEibvsL2wB7gwsYPXjS943yycHYzVDRNAE67QqdDprZObZqTzG6SMnXp2sa LDimoI4bMLjvZltDeZpnXzJaTBO3ciGNfC9SDZBkhI7k8Oe6W4mjfFaIWF3kJzfegu Z3nMtTieucoFGnZGuCxM5KkSRd+GO+1EztlKSshk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shyam Prasad N , Tom Talpey , Steve French Subject: [PATCH 5.12 331/384] smb3: do not attempt multichannel to server which does not support it Date: Mon, 10 May 2021 12:22:00 +0200 Message-Id: <20210510102025.703417295@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102014.849075526@linuxfoundation.org> References: <20210510102014.849075526@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve French commit 9c2dc11df50d1c8537075ff6b98472198e24438e upstream. 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 Reviewed-By: Tom Talpey Cc: # v5.8+ Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/sess.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -97,6 +97,12 @@ int cifs_try_adding_channels(struct cifs 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