[dpdk-stable] patch 'efd: fix tailq entry leak in error path' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Wed Nov 18 17:35:25 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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/24/20. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/941bad7770322c5e10f9e9e0d29d521f51713a02

Thanks.

Kevin.

---
>From 941bad7770322c5e10f9e9e0d29d521f51713a02 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Tue, 29 Sep 2020 11:31:35 +0800
Subject: [PATCH] efd: fix tailq entry leak in error path

[ upstream commit c2402fcaf937b17da2b886443c3733b4234eea68 ]

In rte_efd_create() allocated memory for tailq entry, we should
free it when error happens, otherwise it will lead to memory leak.

Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Yipeng Wang <yipeng1.wang at intel.com>
---
 lib/librte_efd/rte_efd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index a07b48475c..aa86f1a8e4 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -706,4 +706,5 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
 error_unlock_exit:
 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+	rte_free(te);
 	rte_efd_free(table);
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.675267958 +0000
+++ 0039-efd-fix-tailq-entry-leak-in-error-path.patch	2020-11-18 16:33:37.938215068 +0000
@@ -1 +1 @@
-From c2402fcaf937b17da2b886443c3733b4234eea68 Mon Sep 17 00:00:00 2001
+From 941bad7770322c5e10f9e9e0d29d521f51713a02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c2402fcaf937b17da2b886443c3733b4234eea68 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index ec3a4cd58e..77f46809f8 100644
+index a07b48475c..aa86f1a8e4 100644
@@ -22 +23 @@
-@@ -712,4 +712,5 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
+@@ -706,4 +706,5 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
@@ -24 +25 @@
- 	rte_mcfg_tailq_write_unlock();
+ 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);



More information about the stable mailing list