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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 9 19:39:49 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

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/11/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28

Thanks.

Luca Boccassi

---
>From 1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 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 4deeb17924..3fd1f1c97b 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
 
 error_unlock_exit:
 	rte_mcfg_tailq_write_unlock();
+	rte_free(te);
 	rte_efd_free(table);
 
 	return NULL;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.273309985 +0000
+++ 0001-efd-fix-tailq-entry-leak-in-error-path.patch	2020-11-09 18:40:11.063310224 +0000
@@ -1 +1 @@
-From c2402fcaf937b17da2b886443c3733b4234eea68 Mon Sep 17 00:00:00 2001
+From 1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 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 4deeb17924..3fd1f1c97b 100644
@@ -22 +23 @@
-@@ -711,6 +711,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
+@@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,


More information about the stable mailing list