Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2491592pxj; Mon, 10 May 2021 04:23:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJtlaUKyJCup96qkHipgCyLbCnLMXcJmYzm/FCxwBQCAb1uOfh+15UB+hc5rWGr88h+G1q X-Received: by 2002:a17:906:79a:: with SMTP id l26mr25032810ejc.268.1620645713927; Mon, 10 May 2021 04:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645713; cv=none; d=google.com; s=arc-20160816; b=TxpVBz8W1P4i/PkaWZ2zKogDMBNlPTqsMBPwYe2hW5TIIq9Vtj0Yc02jY4uvkmfk4+ tUTWUsBxDW93GLyjUqw5sJiuDoWfemEJl138YOUvqaZcAIckHMRk/6ZhCcf/VRjV4l7S vgU2eeZj8j8/ix5djgmeMishrruCt5r01mJnw4aLxPg8ld1XqqLzxctKv4+2VZCdUdPo 9z3Yw2QH2zwW+vb04E710X9UDPZYVAQnBov0eWxDSyYrMloy4xfWgMmQwGVp6YFQJLpU LJQPS110+wL0STvXzdn0WpqGTL3B0KHdxkj6XR7WOGF27ydy2hT5v7UC+9HytuQy/CXl oaHQ== 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=TuiBq7x4UgRS4pV+5ycKkCeqrkkBCIwexQ1Z7RZDIlA=; b=RSOouWj+0LaZ7jwflLIF+/D7Q75Htb7mjy6CazFD7GLoYXXlswc/2G3kkDJZG7o1/E kAFXIdW00gfraf4JjyuVF+h68N6i9WaKz9uY5X08FLcim4QtUne6k6G0mUjgnAWV90mK C0Z9OzLlEzwq9tmcGQvSZNnnayzhj/WSz/WDSNiMrdbvVa/e5XfkPlI7uxm72E6AOGjh Cn2ubwJTp37FxrqkltxN1rQriLVLf0ka+QITddB0NpTFjyOMBNQjNY+EgUM41evLKNqn Lx5PE0nfpIudtPriS9Hkzxiy9sKGoTViWsOboloHRgNR2jrgCCCMsv++zHIhBi2pHPBU gvxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DPSvaPC7; 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 j5si12827802ejd.355.2021.05.10.04.21.30; Mon, 10 May 2021 04:21:53 -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=DPSvaPC7; 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 S238418AbhEJLRq (ORCPT + 99 others); Mon, 10 May 2021 07:17:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:46508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232830AbhEJKx7 (ORCPT ); Mon, 10 May 2021 06:53:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 624876142D; Mon, 10 May 2021 10:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643299; bh=XBY718aeLLfgEynBg4op5j+VG2Vw2BF1/Yw7EmWk8g8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DPSvaPC7u4pEldkMSlmhVKT5qSQ0yoJX/cUxTM9BeiWfKLadyt/xOiWib1jeG7sTu 9ZLOhFAbuX458tmbUfpkr9GXQ1Fk0JkJI/ufs2iEv7gSLf27ta+X12/wUk4EN2F1N4 wvkaOR6LCnOrOw9hNyUGH/auGlp089lcRvhJU1Io= 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.10 259/299] smb3: do not attempt multichannel to server which does not support it Date: Mon, 10 May 2021 12:20:56 +0200 Message-Id: <20210510102013.507543604@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@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 @@ -92,6 +92,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