Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3521994pxf; Mon, 15 Mar 2021 11:25:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWYWBg8kUMOFeopv1N+9WpAZGmGnIFESvbVIJaY4GT90y49c8a91jArnR58E+UwGD+wc++ X-Received: by 2002:a17:906:fcd2:: with SMTP id qx18mr4371155ejb.327.1615832720916; Mon, 15 Mar 2021 11:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832720; cv=none; d=google.com; s=arc-20160816; b=R9ArNlQlsFVZdA1ZhLsafjfHiaC2Wxqr4+oc+UzHvOHqJ7GYNuOjiOy1DcVea1Mwyq vj1rg1Ae+op9XJvtcDOcz+pLt+WiC//S9nAXkKeroQ0iXkBi5An9bSGga5aiuc0jNN44 QDSXIHz263EMix8bjOcmmXuLNymGoH1PR7kZUgxk7k5iCaPVL9T3oYrepLBZ5QwZnhW2 LQMJTB8VE67LXOyW55goL2zmNjgyVeyJishbZ5H4odxDJVg5DzW1gjs/WGoAv4bfjoR4 7s2Hpihqw1kmTGHFbIbLYP9IGk2rUcmwPqHltddeloAKIODiqd8e+R3W3eHFup8aUOaT wxrA== 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=GSkk7zbXEab6nFHjEQOt/wyGTMq+QWrVXvaCXeLclwQ=; b=LVdvOFDyTFKDMOMxEjDEbWwPiumgqrsBqv8J2NN85hekqVOFtW1x1VQtkH3lwnbGCV Gww8C9KRi7i3QX143gOlmvG+HJCqChKnylheyny9ywF7NgAJKmEmZ/1gFt8A1GY6u0jj CLku/RbDtymOU0BvRODQuRBSCKKcts/K/ziSDwqjr8NsOgkTCh4536FlT03V1EVBqQ4u 22hT+aBoUxxHnQTe6BArDTEVpLKF1H5lGARDlnRfltZRWmqRLIp6RmHzeVYOf7ECNnSJ uHtxOk89yi5xzMXBRfds7Y9jKxEeawaaJzyOK6luNdZTrjMlDmYFLXJvpgqGx5ok/mvU 8VEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Aqt7azrh; 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 gv29si2212771ejc.61.2021.03.15.11.24.58; Mon, 15 Mar 2021 11:25:20 -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=Aqt7azrh; 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 S234296AbhCOOZ0 (ORCPT + 99 others); Mon, 15 Mar 2021 10:25:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:36764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232677AbhCON72 (ORCPT ); Mon, 15 Mar 2021 09:59:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C0CB464F05; Mon, 15 Mar 2021 13:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816746; bh=+DpjSctY2apNocRNa0f4pP85fDO2Csz1NuiWOU41yu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aqt7azrh3HudrIzod0QLSJOw5qtvSXEQoW5JQ5GgMTkZ1JDbcNKKHtaj2R2tHCN5x 9m2vcGfnRO8lvvouTND9C8igXpBXGlNWR3ER5eI9d3ynwuwX/ZEfBLxOcIgX2Lfgd9 TbSWOEDxn1lTAnqJDWlxqye82YfkTf+01g0R8Lc0= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keita Suzuki , Tony Brelinski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.4 082/168] i40e: Fix memory leak in i40e_probe Date: Mon, 15 Mar 2021 14:55:14 +0100 Message-Id: <20210315135553.083695612@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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: Greg Kroah-Hartman From: Keita Suzuki [ Upstream commit 58cab46c622d6324e47bd1c533693c94498e4172 ] Struct i40e_veb is allocated in function i40e_setup_pf_switch, and stored to an array field veb inside struct i40e_pf. However when i40e_setup_misc_vector fails, this memory leaks. Fix this by calling exit and teardown functions. Signed-off-by: Keita Suzuki Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 0604b5aaad86..58211590229b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -15142,6 +15142,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) { dev_info(&pdev->dev, "setup of misc vector failed: %d\n", err); + i40e_cloud_filter_exit(pf); + i40e_fdir_teardown(pf); goto err_vsis; } } -- 2.30.1