[dpdk-stable] patch 'efd: fix tail queue leak' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 7 14:25:39 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/14/19. 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.

Thanks.

Kevin Traynor

---
>From b6b78b5e02731b2a1161eadeb2aa8feaba2feb79 Mon Sep 17 00:00:00 2001
From: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
Date: Fri, 18 Jan 2019 07:40:42 +0000
Subject: [PATCH] efd: fix tail queue leak

[ upstream commit c749c032252997cf50cbe3620a7edd30532423af ]

In rte_efd_create() allocated memory for tail queue entry but
not freed.
Added freeing the tail queue entry.

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

Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
Acked-by: Reshma Pattan <reshma.pattan at intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
---
 lib/librte_efd/rte_efd.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index e6e5cfda2..1a97ece05 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -741,4 +741,6 @@ rte_efd_free(struct rte_efd_table *table)
 {
 	uint8_t socket_id;
+	struct rte_efd_list *efd_list;
+	struct rte_tailq_entry *te, *temp;
 
 	if (table == NULL)
@@ -748,4 +750,16 @@ rte_efd_free(struct rte_efd_table *table)
 		rte_free(table->chunks[socket_id]);
 
+	efd_list = RTE_TAILQ_CAST(rte_efd_tailq.head, rte_efd_list);
+	rte_rwlock_write_lock(RTE_EAL_TAILQ_RWLOCK);
+
+	TAILQ_FOREACH_SAFE(te, efd_list, next, temp) {
+		if (te->data == (void *) table) {
+			TAILQ_REMOVE(efd_list, te, next);
+			rte_free(te);
+			break;
+		}
+	}
+
+	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
 	rte_ring_free(table->free_slots);
 	rte_free(table->offline_chunks);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-02-07 13:19:56.314034743 +0000
+++ 0033-efd-fix-tail-queue-leak.patch	2019-02-07 13:19:55.000000000 +0000
@@ -1,14 +1,15 @@
-From c749c032252997cf50cbe3620a7edd30532423af Mon Sep 17 00:00:00 2001
+From b6b78b5e02731b2a1161eadeb2aa8feaba2feb79 Mon Sep 17 00:00:00 2001
 From: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
 Date: Fri, 18 Jan 2019 07:40:42 +0000
 Subject: [PATCH] efd: fix tail queue leak
 
+[ upstream commit c749c032252997cf50cbe3620a7edd30532423af ]
+
 In rte_efd_create() allocated memory for tail queue entry but
 not freed.
 Added freeing the tail queue entry.
 
 Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
-Cc: stable at dpdk.org
 
 Signed-off-by: Hari Kumar Vemula <hari.kumarx.vemula at intel.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>


More information about the stable mailing list