Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3524244pxf; Mon, 15 Mar 2021 11:28:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxR2k686J+vjOwILc4H2RigYFW2pwnDAHfJk/oiijy9mINU6E8SightAzP+/pNEPdBbCpMT X-Received: by 2002:a17:907:75d9:: with SMTP id jl25mr24748690ejc.452.1615832906571; Mon, 15 Mar 2021 11:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832906; cv=none; d=google.com; s=arc-20160816; b=Pz4sQ3oVcJjTX0lfVuVXSaE5HurncSXh0AjWng0f+hzfqijpiQptdENqYIs/Zw+doI bOpDKfy3/7etW7NGri3P4nYacaXajOy6T58ojZXJ+O/KBFIxeuqdNtm2tVNXBNLU+FLE UybZKtgbfkdknZuPXoh9a4GBRR25E8h5+rkFc7lPgFRSQOE6r2+lcYGiR10G4fw34JF1 OzJW1r2PeYKdSWBrMP66+bTJcVGxfCfIX4m1xXF9AHzd5KI8iZiThME3Wzrs7bNvYpm3 Bz5G3m8VPmBXSO4l0lWhQFN/BjgfR0zOCqbj8v8+23CvNZ/D9eTBUUsKv2/ty64MjKMd GA7w== 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=XZNJx3EnLT1FI8X1gkkyGWzEu0yewcLfDCWOGSWCMOE=; b=Q5vFopZ7YBr++TYmnAjufYRs4a7h2xjo0QqbO/Z2J+0zGexP4ZI2A2+LYkl9Ake2R2 thbirufaFAaXMsU39qhgjIKC7bcYIUCdH2x7KRArp5xPH4Sz25V6W/pR4uO8Th4rR/ht K8v95R5fPUdXlbZxXK9jvY0IzD98KJsVUXr3M9k11iiHmZ8PyskOLHh9skyxLveB1QIM Q3/ne/JdwM0AVAuLFXmJw8JtxxQ2a3158mbOtvZO2qsbsakRfz99l96281d3rbJQs2Wd bXIQ8m/d7YDe3A0ldGEof+SYtSSTdcbTkcDlCm0dTLoUTo9Uaq2jZpgXziSbXMRcsDKz aljA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yNJBWo83; 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 v22si11206125edc.137.2021.03.15.11.27.59; Mon, 15 Mar 2021 11:28:26 -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=yNJBWo83; 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 S232041AbhCOObZ (ORCPT + 99 others); Mon, 15 Mar 2021 10:31:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:34900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232374AbhCOOBK (ORCPT ); Mon, 15 Mar 2021 10:01:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD05F64D9E; Mon, 15 Mar 2021 14:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816836; bh=h/xQxGNjHNezwy+9QWCwIft7+YnxvUgQeT3JbexJA8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yNJBWo83OVVDgoNwD5/iBA+AOyeXeCQKemfsiiM/As/XskGClJ745GKoDFXBuFLbT FF+7wa9XLrsYVO4AUWnppvcJpJvNjis9X5z6cc9dd+4XD7e0W/zdELpddA5Up1tb/Q H/Yxkg+AS2r+JW7uW8U3azkYYdopzyXoCWcJtWSE= 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.11 154/306] i40e: Fix memory leak in i40e_probe Date: Mon, 15 Mar 2021 14:53:37 +0100 Message-Id: <20210315135512.845130232@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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 fcd6f623f2fd..4a2d03cada01 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