From: Qiming Chen <chenqiming_huawei@163.com>
To: dev@dpdk.org
Cc: haiyue.wang@intel.com, Qiming Chen <chenqiming_huawei@163.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ixgbe: fix hash handle leak
Date: Tue, 31 Aug 2021 21:24:07 +0800 [thread overview]
Message-ID: <20210831132407.7481-1-chenqiming_huawei@163.com> (raw)
In the ixgbe_fdir_filter_init and ixgbe_l2_tn_filter_init functions, after
the hash handle is created, the handle is not released in subsequent
abnormal branches.
Fixes: 080e3c0ee989 ("net/ixgbe: store flow director filter")
Fixes: d0c0c416ef1f ("net/ixgbe: store L2 tunnel filter")
Cc: stable@dpdk.org
Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ccb01ed344..3fd3249150 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1393,6 +1393,7 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)
if (!fdir_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for fdir hash map!");
+ rte_hash_free(fdir_info->hash_handle);
return -ENOMEM;
}
fdir_info->mask_added = FALSE;
@@ -1429,6 +1430,7 @@ static int ixgbe_l2_tn_filter_init(struct rte_eth_dev *eth_dev)
if (!l2_tn_info->hash_map) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory for L2 TN hash map!");
+ rte_hash_free(l2_tn_info->hash_handle);
return -ENOMEM;
}
l2_tn_info->e_tag_en = FALSE;
--
2.30.1.windows.1
next reply other threads:[~2021-08-31 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 13:24 Qiming Chen [this message]
2021-09-06 1:38 ` Zhang, Qi Z
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=20210831132407.7481-1-chenqiming_huawei@163.com \
--to=chenqiming_huawei@163.com \
--cc=dev@dpdk.org \
--cc=haiyue.wang@intel.com \
--cc=stable@dpdk.org \
/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).