Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3526342pxf; Mon, 15 Mar 2021 11:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZ2hzv9WnhwhoR3Z2zPzexYSplp6OgwbOrYUVPd6nk0Z+FHoJGAKQUyk9s1UM20SKpBVd4 X-Received: by 2002:a17:906:32da:: with SMTP id k26mr25168684ejk.483.1615833071371; Mon, 15 Mar 2021 11:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833071; cv=none; d=google.com; s=arc-20160816; b=a9sW3Rosg5QDAJQWNoeH4wY929DSjiX9AmGiJiIuJg4rQk4NdWenbx6obK4fpKRL5C npiVAPSDZAn+l4VR4sfUDZQG4GIav3qDksznSeC7fnqALM59t9R8L8hqmU/Ei1vAYZwv Ffoa0BTO1SfXRoVfT42NfaDNTQCKYE+fqF6GBpd8jwWdNlEUEhBgU/yA0JX/jz2Fya8i Ss+4AGgWPS9OVOA9+AmlwYBfKxZCXp8eVPHcvtAusVmQ0C/MswE8dGAvCwlJxFRCAQmo pufSiTOEGJRCT3jukZwaKheOGLoFHFvFvpHQuQMsxQrUIbNtrYRE7mzYVFEalqCgcpDc tCaA== 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=yyC1vXDcJJB0sT6XVWCdKwZKDSFXe+Wm8c0lE8renhE=; b=JyVMG3IHDSO1wwUP09hX2ZyPxoKQkLhOD73+NRTL56zsCgq4CCMErpYrbxEnKwHpjr S+zZb4dsO79F3Oz6PtQa8EIrVKTxCYb2myJKytYLCOCOSTd45OtdLUU446t9JK14WLDV zwBSmon77LC/3tFWAOQ6IbK7DHAPCGpu0WkJhW+ckNxGuU8jQFUS3WZlqkcnmj80HUHy 3BjPiNqm5ykIL8nT1KWZCX0P7W7E04Qor34i7dCocJoBYWNeBAOoAtwl4+E6uWr+wFIs llppjZJ+obu0xBkDm5ww93WjbazbfFpc+FpyUmLsqL++MOJ+nOO4XobLhf6sBSqBx2A5 nUIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="k/7UjM7i"; 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 a13si11946873ejx.335.2021.03.15.11.30.48; Mon, 15 Mar 2021 11:31:11 -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="k/7UjM7i"; 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 S240623AbhCOOiL (ORCPT + 99 others); Mon, 15 Mar 2021 10:38:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:37836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233302AbhCOOBW (ORCPT ); Mon, 15 Mar 2021 10:01:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B74864F8C; Mon, 15 Mar 2021 14:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816862; bh=3lmgVQkraHIdpih845aGlCWj2Eykja87ToBmRkRG6Kw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k/7UjM7iv+8tXXVuOhIsHaufNuGWKNGtR2Pi8GmKunhtK5QegfjXW+bZuNvlRv4iB Xr/WgOIhGs/yjmmW4QHyVlASGNfHPxW3vt46IdiyV1ERZdF+mFDGYny9Hj58tZkpOr wPl+yH3MzkArs3TQAC4rzhihEKMkJRtQia1C/oTc= 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.10 158/290] i40e: Fix memory leak in i40e_probe Date: Mon, 15 Mar 2021 14:54:11 +0100 Message-Id: <20210315135547.251640808@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 59971f62e626..3e4a4d6f0419 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -15100,6 +15100,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