[dpdk-stable] patch 'net/ixgbe: fix hash handle leak' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:42 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei at 163.com>
Date: Tue, 31 Aug 2021 21:24:07 +0800
Subject: [PATCH] net/ixgbe: fix hash handle leak
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 ]

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

Signed-off-by: Qiming Chen <chenqiming_huawei at 163.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.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 bf0e850402..1af04357cc 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.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.809835755 +0800
+++ 0038-net-ixgbe-fix-hash-handle-leak.patch	2021-11-10 14:17:01.787413440 +0800
@@ -1 +1 @@
-From 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 Mon Sep 17 00:00:00 2001
+From c1723e2d14001ac5b7aa0227e4aef911b4e0e9dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 03f83d6c5c9f9d30ef2cd7c2b0fe5d86935cd372 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 3cd2a094ae..7b198d95c2 100644
+index bf0e850402..1af04357cc 100644


More information about the stable mailing list