Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2066618pxb; Mon, 12 Apr 2021 13:27:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9rcmpH3VQleS6KvaAwpMfbPz0VM1lS2FzrQ4r+t4DY+/rssaqWSFrSEBvKnejgpCqbjr4 X-Received: by 2002:a50:d1d5:: with SMTP id i21mr30678337edg.15.1618259226097; Mon, 12 Apr 2021 13:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618259226; cv=none; d=google.com; s=arc-20160816; b=GZHZiiFBp8CYMUImXXGxpda3OI1lnjGzwqN9evmTFu7ci7xq9F8hLFIq+nkwWJlB4S YzGSNCsJPzaWeqe9HLMwErIUezpyvFJbC2ua0gn+fHn+7z5gA9eOThaT7Pw4Eolti+bh 7paWGmL2NgIWPip/Zodbn0ky5r2SBrIFWBn/2moubAalgTAu05MVHIHF4/qtd3zT0Apk k3ytRo87O/DhmrWnnowx7WS8r1Owq8GUWPLrMTEkQyLfZSRJk4bh2yGYOMZ9hOjz9+j5 ugPW7TVXlWQr6WXWEnfVm1ht67rC4msjtatGeTHlDXML8UMgO5YtVB3K2b5DEjViUX5a aC0A== 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=31352SgI06N0xdSiQ1xMZJc0GHItRhbzxZHeQt9m1fg=; b=Gqwqh1ZU+jixFvfc0OPY6Pb7rWrnIs4hcDWdk3sa0eEli1qdlg+9E4zhY3nfCSgQBr EQCBvac+M96k+ggAhGvMKsXEc7dichLOtSGheFTdo3+73rxtl4Hitdu+LzrfgvFfMCm8 njfUiDLqelSdr2b9a8Clu9f1+l12VEBjpzfI6XLXK1eQErWbxx+qXGz8IroPemXSJRK4 W9e2Vx/w26h0kk7JfbfJL7Mj50vrscFPrFv6BnydjwcsmEhavEJ608VcKEEGbePR+LBI Z3VHXUqnJ/fndSJLHcxA49BWgKD0yFlyDzs8ascNVvaQX3RMpQjJjoVYOsCgvf8OyoM+ +sFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="yDV7/O1Q"; 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 i22si8796331edc.112.2021.04.12.13.26.43; Mon, 12 Apr 2021 13:27:06 -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="yDV7/O1Q"; 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 S238528AbhDLI61 (ORCPT + 99 others); Mon, 12 Apr 2021 04:58:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:40154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238685AbhDLIuX (ORCPT ); Mon, 12 Apr 2021 04:50:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B917861221; Mon, 12 Apr 2021 08:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217406; bh=jBRUFglnNdw0KOfhuM7z0W/o1JViC7DrVEDwILNlN7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yDV7/O1QRBV3fIDNp5y6y62mSeReYy7S42qrkYtKKZXub3xfnUEQrVi0IDjrcZC/h kQXOn0nn6PGMWsLsniMKOjCSFE3L3qMc6MFULRc5TB3CqfIyIsfOv8v1ILvHxcEzxh iN6X/T1wkPt60BYUbkdUp8oXuC268H366t97FCf0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Potnuri Bharat Teja , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.4 092/111] RDMA/cxgb4: check for ipv6 address properly while destroying listener Date: Mon, 12 Apr 2021 10:41:10 +0200 Message-Id: <20210412084007.314202382@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084004.200986670@linuxfoundation.org> References: <20210412084004.200986670@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: Potnuri Bharat Teja [ Upstream commit 603c4690b01aaffe3a6c3605a429f6dac39852ae ] ipv6 bit is wrongly set by the below which causes fatal adapter lookup engine errors for ipv4 connections while destroying a listener. Fix it to properly check the local address for ipv6. Fixes: 3408be145a5d ("RDMA/cxgb4: Fix adapter LE hash errors while destroying ipv6 listening server") Link: https://lore.kernel.org/r/20210331135715.30072-1-bharat@chelsio.com Signed-off-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/cxgb4/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 3c78f8c32d12..535ee41ee421 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3616,7 +3616,8 @@ int c4iw_destroy_listen(struct iw_cm_id *cm_id) c4iw_init_wr_wait(ep->com.wr_waitp); err = cxgb4_remove_server( ep->com.dev->rdev.lldi.ports[0], ep->stid, - ep->com.dev->rdev.lldi.rxq_ids[0], true); + ep->com.dev->rdev.lldi.rxq_ids[0], + ep->com.local_addr.ss_family == AF_INET6); if (err) goto done; err = c4iw_wait_for_reply(&ep->com.dev->rdev, ep->com.wr_waitp, -- 2.30.2