From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Keita Suzuki <keitasuzuki.park@sslab.ics.keio.ac.jp>,
netdev@vger.kernel.org, sassmann@redhat.com,
anthony.l.nguyen@intel.com,
Tony Brelinski <tonyx.brelinski@intel.com>
Subject: [PATCH net v2 2/8] i40e: Fix memory leak in i40e_probe
Date: Fri, 19 Feb 2021 13:36:00 -0800 [thread overview]
Message-ID: <20210219213606.2567536-3-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210219213606.2567536-1-anthony.l.nguyen@intel.com>
From: Keita Suzuki <keitasuzuki.park@sslab.ics.keio.ac.jp>
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 <keitasuzuki.park@sslab.ics.keio.ac.jp>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
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 1db482d310c2..84916261f5df 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -15122,6 +15122,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.26.2
next prev parent reply other threads:[~2021-02-19 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 21:35 [PATCH net v2 0/8][pull request] Intel Wired LAN Driver Updates 2021-02-19 Tony Nguyen
2021-02-19 21:35 ` [PATCH net v2 1/8] i40e: Fix flow for IPv6 next header (extension header) Tony Nguyen
2021-02-19 21:36 ` Tony Nguyen [this message]
2021-02-19 21:36 ` [PATCH net v2 3/8] i40e: Add zero-initialization of AQ command structures Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 4/8] i40e: Fix overwriting flow control settings during driver loading Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 5/8] i40e: Fix addition of RX filters after enabling FW LLDP agent Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 6/8] i40e: Fix VFs not created Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 7/8] i40e: Fix add TC filter for IPv6 Tony Nguyen
2021-02-19 21:36 ` [PATCH net v2 8/8] i40e: Fix endianness conversions Tony Nguyen
2021-02-23 3:20 ` [PATCH net v2 0/8][pull request] Intel Wired LAN Driver Updates 2021-02-19 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210219213606.2567536-3-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=keitasuzuki.park@sslab.ics.keio.ac.jp \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=tonyx.brelinski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).