Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp916600pxb; Wed, 1 Sep 2021 12:36:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye1urgD1NP/E56HyGKCnJzOo0tuTcXkUFJdVLPVm0VFryw1MNraNspJwNQnhuwdv5b9B63 X-Received: by 2002:a92:ca85:: with SMTP id t5mr806721ilo.109.1630525015339; Wed, 01 Sep 2021 12:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630525015; cv=none; d=google.com; s=arc-20160816; b=pnpzyxDfDPR8TbqxFoVQchubcaPDHRCVtwF/7mpuQjSm+0bsfWgCjnWI7+KNPkY98w t2Ri8Nbk+URMzic2eU51pRHyYjtjQGXVrYCSGXswnL+3h3exnqjXchp8Wf/p3tUzHn89 d6LqkwqaqiJKNJD+O/lSkYt2jWK1ZSLGj6xRUGlTikmCrXvShhcqzfNZN3IghxXwV1A8 DYh5+KjMKOWpBItSaU6M+BrCNxL5jgIdbTjCVHh93qCsNFk/HCNRxyAPMtoaQUq3V4h/ x4ziZzwvb4HjhRQwqvn74tHoG609f3RxU36boW1dI2uhXmWeutxEdBbWNQWF1AdeoIah mEig== 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=tJafzz8kDJHFZw3FnaBK9QlEFk1n8OEl5vw79WN7yYk=; b=SsdHy+haCZ2iFozlFaz4xceEe+XwPBRfdo6F1UD7PHTfXYS778zXH0cyfxtibRgXfn zWh0hUvhYEpq5ZdEsdD0R3g4ILxUv5XSDdkHJdTgcnLhPUaw23r3pcPQuj1RmS/jqCV2 MZTqKBlxloELXGkKViPCbdZLWKSxL2S7N9K6hMU70tIjuLCZobhK+KXq6oPA4wyJykzZ MTeX3BSSoXRsNinOxx4dIWnFXszjDIgbZ/yrioFbDIbIMqI0b5Hb04spjil5xGNfJ4cf RkVjH/ZaENzZ5lcp1WKPrh6D7KOmmz3SrQJWMtqeX4u++z+LxTmVZRCdt8QnhU1DFiLF qPoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MJDX7xdG; 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 w19si378268jab.68.2021.09.01.12.36.44; Wed, 01 Sep 2021 12:36:55 -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=MJDX7xdG; 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 S1344799AbhIAMm6 (ORCPT + 99 others); Wed, 1 Sep 2021 08:42:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:43452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344640AbhIAMju (ORCPT ); Wed, 1 Sep 2021 08:39:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 272A86102A; Wed, 1 Sep 2021 12:35:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499735; bh=p0sK5D8Q+TYYIViGSLpRcHKYImVJPzRcGIILvkNfRkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MJDX7xdG0dhbtkQggWRauyrAqXxhSN0KZUJlgJyzVUDZuIkSsUAvAQiHedYhpYxxL MiQq+Rb4hoPKMm4BJ99MZTU7/LJP/MYtCWlx2ZtXaIFzkg95V3deFF83nxOpWI9Jmf Yt6BVCT5PgzHQv/v6hfMVeY0u8ETp3N03wMaofjQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Firas JahJah , Yossi Leybovich , Gal Pressman , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.10 032/103] RDMA/efa: Free IRQ vectors on error flow Date: Wed, 1 Sep 2021 14:27:42 +0200 Message-Id: <20210901122301.632764792@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122300.503008474@linuxfoundation.org> References: <20210901122300.503008474@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: Gal Pressman [ Upstream commit dbe986bdfd6dfe6ef24b833767fff4151e024357 ] Make sure to free the IRQ vectors in case the allocation doesn't return the expected number of IRQs. Fixes: b7f5e880f377 ("RDMA/efa: Add the efa module") Link: https://lore.kernel.org/r/20210811151131.39138-2-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/efa/efa_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/hw/efa/efa_main.c b/drivers/infiniband/hw/efa/efa_main.c index 6faed3a81e08..ffdd18f4217f 100644 --- a/drivers/infiniband/hw/efa/efa_main.c +++ b/drivers/infiniband/hw/efa/efa_main.c @@ -377,6 +377,7 @@ static int efa_enable_msix(struct efa_dev *dev) } if (irq_num != msix_vecs) { + efa_disable_msix(dev); dev_err(&dev->pdev->dev, "Allocated %d MSI-X (out of %d requested)\n", irq_num, msix_vecs); -- 2.30.2