DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ixgbe: fix hash handle leak
@ 2021-08-31 13:24 Qiming Chen
  2021-09-06  1:38 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Qiming Chen @ 2021-08-31 13:24 UTC (permalink / raw)
  To: dev; +Cc: haiyue.wang, Qiming Chen, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/ixgbe: fix hash handle leak
  2021-08-31 13:24 [dpdk-dev] [PATCH] net/ixgbe: fix hash handle leak Qiming Chen
@ 2021-09-06  1:38 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-09-06  1:38 UTC (permalink / raw)
  To: Qiming Chen, dev; +Cc: Wang, Haiyue, stable



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qiming Chen
> Sent: Tuesday, August 31, 2021 9:24 PM
> To: dev@dpdk.org
> Cc: Wang, Haiyue <haiyue.wang@intel.com>; Qiming Chen
> <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/ixgbe: fix hash handle leak
> 
> 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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-06  1:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:24 [dpdk-dev] [PATCH] net/ixgbe: fix hash handle leak Qiming Chen
2021-09-06  1:38 ` Zhang, Qi Z

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).