Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1594740pxb; Mon, 12 Apr 2021 01:47:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysfML94lbMPryNwDQK3b9uFQP2M7zSMjV43+Z/1rfUelxIyFqDqsP0Ae86WT6lMcUHCf21 X-Received: by 2002:a17:902:e313:b029:e9:263e:f5f9 with SMTP id q19-20020a170902e313b02900e9263ef5f9mr25254109plc.53.1618217225485; Mon, 12 Apr 2021 01:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618217225; cv=none; d=google.com; s=arc-20160816; b=CdIFYZbCSsCCmo52hpFT0wi365vOj18R4jeRpTXeLh+FzAFZVFmEii1c1GAJPUFb11 SlSNp6oAQTWbz5pzqSBU//pn+7p0o5uex82U4fHx7tX1h0CKapUYWtCGaF0+WkD54mHh uzkqY/CU0buFTzOyiUa8FSuLc4ms5ui/ba6V89rJy00qvLrmg9YgEOAwLK2e4rP2yRvP Y+g7Y+l86P3SCIyHebzvdDVzTLJ/Tj8V0+Xj0u5E4SU8Zezcwt8UkzW4TqiM5MH+tAui J03xYFKUVSbIqW6RRx6myn2I2VK2b6ZtAqj5YN+Rgi32vtpWEtj4/mwS/xc3qHjui+sL GOlQ== 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=7lpVGjPD1YgRuS9sGa/IB6njWM5aeZ5u9sNEp3c9tak=; b=LtXyRZJyI3Gw6U2P2+Mh5Iw5Szo61OhAMPHFyivbWlN/3l+GT/uqRIcfPM77i8RoAS XBSiOOasobEY2jPQsB/0EPRWx7+RndMa5BfKRwSU2RKu5QFG8JME5AONMCWGnSTylkZG TW8YrLCGo/8E5fkdDfVSJJx7Q1LVlxlI1ylNqnQBIQkFNVybUz253+8j6hoFPuWpfY8P j5Yr4ezHTTScQLCrCJU8uUt4ScitJ8CCcs0+F58loPcDbU2ZV4B0jBkg2otJ8u4Qw5AR r6zNwwMSgSLLJ2JmtSPF0xEyLa0c8L2SekvEu5eHSmqOjx+RCbAn2jtdFS2wZYciG6P/ Qe8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KwWOT3FV; 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 g4si7535110pgo.462.2021.04.12.01.46.53; Mon, 12 Apr 2021 01:47:05 -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=KwWOT3FV; 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 S237749AbhDLIpI (ORCPT + 99 others); Mon, 12 Apr 2021 04:45:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:36452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237670AbhDLIoZ (ORCPT ); Mon, 12 Apr 2021 04:44:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 27F9561248; Mon, 12 Apr 2021 08:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217047; bh=FXMh89Qvk+7e6uXl+ktCtBNzEj6D7ek6G85o5CtZXM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KwWOT3FVOkMk8yqepAZ0/7+d1+aVb3vltLKw8613TSKIN8i0aZyGtIZi4ah37gkkg hwUm7Os4r60VYR+lsM+ktPqlIOLfO+2LsuTf2srb5BFI2Vou4GEWizm19RZWl6id25 5uihwp8vLureS+dW+d5HNEBIZlX5RTktefzIhjBk= 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 4.19 50/66] RDMA/cxgb4: check for ipv6 address properly while destroying listener Date: Mon, 12 Apr 2021 10:40:56 +0200 Message-Id: <20210412083959.740023838@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412083958.129944265@linuxfoundation.org> References: <20210412083958.129944265@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 b728a1bf916f..6c1a093b164e 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3523,7 +3523,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