Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp851607pxk; Thu, 17 Sep 2020 19:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUWK1YWy/v2K7NpWHRpWxAg70sQc+RqWou+DJCZP9V0ApbAtkYIXwirVNkSE9DWJ15E1/l X-Received: by 2002:a17:906:8258:: with SMTP id f24mr32675133ejx.551.1600394657680; Thu, 17 Sep 2020 19:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600394657; cv=none; d=google.com; s=arc-20160816; b=JJpfbiRtzB7wDFY1WQXcXUT1kkqOnxwjTKSkE1ZCFTx3bjZFvL+0IGhuT32r/MrKuE 9F2UT23euwuZPhsMUwxuh56vfIlXMurNqCrF3+fdAt5/bqcsCiaLbJfVFneq9UOhdpNL j+lJgqOw9IR7dVJH9aMKqtPO1TSktANtD5TmorJMe8xS/oH4w0XKvDiLZC14JGACVKVz zGgJg3YDoyXqrPksgXbdMo/I06ivMSFg5XooVXwnwb7hPyL7WRWoSFegqvbECuPl3XgW doHnE/MRimxjN2ApvtSxMXVnGPEl/xftJBltcHgHGSNMES4x/j/bxRljBnQRJAAPC6g+ FNeg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uF6eFZ2QN/C1vRmuvrxA/x6UHEPvT5FiU5J4x5tWr90=; b=CsJmb/NJms/aCDh1p+zAJDm/NWdkMtaaSH+Gk93P5jZ4WqDE/gkRYo8cyZYZ/tkwIG epuBCr0eAmcdyMxyyVMFhbeGimMoMvtvyZjzXvcZbJm80jxvtsc5NF4P8Z/7Nc9gseIJ dPMrCwsnaFvOb+/qPk7pFSa3K6oTD/pRgvl0zXEayeSs3dRPs+baItpjYV/JRrQoKkxO Yl3XYZp6XBFa4EEGZ6/H1Dr67Uysoomp7td7gWKyR/yyp1qGy9pz/ENc+3idZWSv/ysk UG9FwmzjgnmThLukOeJ5pP0Wqc6+eq1+6EImvTIGzsw8z2Q3uvaI36nMMi+qImhubSLX CDxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fH4wSrX+; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si1137719edk.57.2020.09.17.19.03.54; Thu, 17 Sep 2020 19:04:17 -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=@kernel.org header.s=default header.b=fH4wSrX+; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbgIRCCV (ORCPT + 99 others); Thu, 17 Sep 2020 22:02:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:47242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgIRCCO (ORCPT ); Thu, 17 Sep 2020 22:02:14 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A1E062311B; Fri, 18 Sep 2020 02:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394534; bh=pRNGbiRoRgPMYVV1IBDeNhpUaUDuxTENbvyEKeYl//k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fH4wSrX+n/8JKSb8ofsSpdml8sg1f2ioLk+vzVI8gf0sG9uXezurcpKtYwE3BMXr9 XlrgidgmHQg85XZ0K/ZZD2lch3CD8c0ne4+OnEWAr3e4kXZ3Uc20iGAbcuJrJVSO9w Ggq7QRtCKkk+sSVpzGvSqppiYAIfzV+y96/uwuLo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christophe JAILLET , Jason Gunthorpe , Sasha Levin , linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 053/330] RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()' Date: Thu, 17 Sep 2020 21:56:33 -0400 Message-Id: <20200918020110.2063155-53-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit 9067f2f0b41d7e817fc8c5259bab1f17512b0147 ] We should jump to fail3 in order to undo the 'xa_insert_irq()' call. Link: https://lore.kernel.org/r/20190923190746.10964-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 6b4e7235d2f56..30e08bcc9afb5 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3382,7 +3382,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (raddr->sin_addr.s_addr == htonl(INADDR_ANY)) { err = pick_local_ipaddrs(dev, cm_id); if (err) - goto fail2; + goto fail3; } /* find a route */ @@ -3404,7 +3404,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) if (ipv6_addr_type(&raddr6->sin6_addr) == IPV6_ADDR_ANY) { err = pick_local_ip6addrs(dev, cm_id); if (err) - goto fail2; + goto fail3; } /* find a route */ -- 2.25.1