Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2136481pxb; Mon, 12 Apr 2021 15:40:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpAVtA/lR0gwVAB2YpAQ3zmYpVzBTM6wwj2qD6w1Hu98VPpMjLjKODAUsE7XN+4USNN0pw X-Received: by 2002:a05:6402:35c9:: with SMTP id z9mr31458772edc.94.1618267221160; Mon, 12 Apr 2021 15:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618267221; cv=none; d=google.com; s=arc-20160816; b=HbJ1GP35d0fKhOMzWKVKMpJsFpavY+yUaYhQN8S8T3uSW6feyTDijdaypd+iFCbdFQ FW08rNWiwt4lr6vH9U0ifxrZRfjIivWMRX+NE5J3A+Qgjcets7DYnsATNmWIPu7prlTn FlbhQots9J1rBQdY6ackx37Nf2GrQFHSR00qB/KVTOd8/X6wdpQr8j70voOwSwayYtqs J1pLimHVvKhOzqYviKwE17m8t0XtcnMRiZptx+q4LRW8AHYsyv8PqhTrs3Ll6d09ZKNX 9tz52mPR8BZvGJmDt/yM2WN/5EtUZZ5p4goEuS6ovPr+X4hVj3D+pJRCSJ4S9V+cOLb1 zaPQ== 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=yXRcGYUXH0itTXIsZRLtQgxkPb8u1mmOk+4UHvHLOec=; b=Ux6xHfcCj4hEUD4dKyRF5BvbkzZMK91CEyFLPdcJdX/0l7uwdE/L8Wy8HAJmXYsNHd 2vd66kBorr41369kfbQV9zBpXEB/4GX1wrtyr61D3HmX72PWbcgeDdV2LF5G1ZsWzEuI PzZrI8ZUFWq5ZpzO4Suf6i5gaGfyUb4nDLu+jPayEBdIs7nEP1qJ8wp+YBaBIfpm5xcN K9FLOjP1pFQa/zxCdEgyoDJo04+f6+bcOeRcFP+JIW03iJj1TlB+nrSBXmdIj0d4xdPh 9Mlwh12/XF5HODdIJCSQCHBkxKeZiPya26dY2IJN8Z1N5EkZlhM4oxg833VN1hnowU2V 2m0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bHoZpl2t; 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 i19si8575341ejd.152.2021.04.12.15.39.56; Mon, 12 Apr 2021 15:40:21 -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=bHoZpl2t; 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 S240186AbhDLJig (ORCPT + 99 others); Mon, 12 Apr 2021 05:38:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:34724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240713AbhDLJKx (ORCPT ); Mon, 12 Apr 2021 05:10:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8DEFF6139E; Mon, 12 Apr 2021 09:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218394; bh=QYGxQbmqkjispYUqxoto1VIZKi/nz+AlQ9sUJVPZmmI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bHoZpl2txWpIWKdKLHBoCwIcUFymiq2xeo5nQpprR81RvA5ZiyuN/TpeP6DjaDZKe uxBmtzMg20z+VD9lb+xWaZGMPAE1a8RFH0VdiO5GOdqMPj0qJTvSDf1mUffTsrm+eM ZD/Rd86KjjhK7/nnJF9mrEo0TcbHZ2fLdoTEiH3A= 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.11 182/210] RDMA/cxgb4: check for ipv6 address properly while destroying listener Date: Mon, 12 Apr 2021 10:41:27 +0200 Message-Id: <20210412084022.072040466@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@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 81903749d241..e42c812e74c3 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