Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3519561pxf; Mon, 15 Mar 2021 11:21:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWKWY3Kcs6jY9HU59f6x4FARHDeyLW7QuGzSlAUCRyD1j2YGaRiS4Ml6d/TINmHIEGnYCl X-Received: by 2002:aa7:cf17:: with SMTP id a23mr32258201edy.30.1615832496382; Mon, 15 Mar 2021 11:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832496; cv=none; d=google.com; s=arc-20160816; b=cbTQqvkwSw6qBTiIVovNEWFqy9oZ+vVPja9EY5TaRCulYXuDK5mPokV4ZvaVLqK0vK 5LmkuWyw3DVm9sGu9ht4RbNXzzmAapZdzbMOrDOe4t+AyfkBchotgRORXF1sbLpQkZBv iZ+eXxEqLVFzLxkWzyrk1VMRzjUkT/NTcYg79W28TYu+PbJPPZ7NFSzw4Ly29t6jqvgJ YWx5siKhycLThu43kxDLiyL4EOLdZY7aRnEd228l90QRDfFCzELSds60R7VVRGoP5Ni0 mVF1qWQX3xRQ7OftqC6B7EKb3F5C0Ks4GxflL+gQIhc9+BEWki+uwz52dPAvX1WKAbv5 2Elg== 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=Cfv8nuQR8qHDPbLzjiPBO1BXRsD72XgilVspDbrYN3M=; b=NmN/FM3g4RWc9pTW4vtqPC5tb0BghTrt9zvgvSVMHxTJMHkegVML1tuaVhzymSF4PO Qfmanx4ncmmMmpGQs5CAI2RBkujXWw/rEkoYcDnAfE+y0Ia5hUOHUqb9lxhL6ZN5mLFt ln2uW1Ye+L3aF9sfwGS6ltbTbGuFh5qrE2A6PSzdoaa8bgU9wPnI5FwxLY8m4+56yVC/ d/qmvK/OfCg1Z2pJQz3jZ6fj+MBlA+NYK1F4tgoSvYsXdVQvjeBZfG8r/Bo0FUokZW3T bC8YXHyuxkd5NAaCouxO0QfgvMP6z8l4XiVfG3mhMcc+5xetzP1HLSyZ0Hug4qhU/vyz NnCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ufaYyQ28; 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 u19si11326638edq.33.2021.03.15.11.21.14; Mon, 15 Mar 2021 11:21:36 -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=ufaYyQ28; 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 S230438AbhCOOUO (ORCPT + 99 others); Mon, 15 Mar 2021 10:20:14 -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 S231909AbhCON74 (ORCPT ); Mon, 15 Mar 2021 09:59:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 71A7764F84; Mon, 15 Mar 2021 13:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816767; bh=iHA1Hi3XfyjD2d5Ym7LqwH1pN8rtpdsYwg+EqhSgnC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ufaYyQ2813AB1DSiucuOKwIhio2l6gsMbcHfNv9kv0UEA5nLrIkCF69uec6QiqRZy dOCRK91ehxUnDFr62znXqCcJDYbxc+HIeeHfbnyLyqYY6WKp9FMQCXZEtFYO70XTsP aNxShJfzsGGUzbBEbw7JDHpmMdF3GZpDaZqD8hsg= 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 4.19 054/120] i40e: Fix memory leak in i40e_probe Date: Mon, 15 Mar 2021 14:56:45 +0100 Message-Id: <20210315135721.754166431@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 fe9da568ee19..1591f81d8ae3 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -13956,6 +13956,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