patch 'pipeline: fix double free for table stats' has been queued to stable release 21.11.5

Kevin Traynor ktraynor at redhat.com
Thu Jul 20 17:17:21 CEST 2023


Hi,

FYI, your patch has been queued to stable release 21.11.5

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

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

Thanks.

Kevin

---
>From e531825d4eb211c97b402b602bafe5dc6de5e740 Mon Sep 17 00:00:00 2001
From: Kamalakannan R <kamalakannan.r at intel.com>
Date: Mon, 17 Apr 2023 16:52:43 +0530
Subject: [PATCH] pipeline: fix double free for table stats

[ upstream commit 2d9e10932d535ea553081b489a25f6fce7ec7996 ]

The pointer to the table statistics data structure needs to be set
to NULL after free inside the table_build_free(), as this function is
called from multiple places, leading to double memory free error.

Similar fix for the learner_build_free() function.

Fixes: 742b0a57f50e ("pipeline: add table statistics to SWX")
Fixes: 4f59d3726147 ("pipeline: support learner tables")

Signed-off-by: Kamalakannan R <kamalakannan.r at intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
 lib/pipeline/rte_swx_pipeline.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c
index 8d5073cf19..25b5b0955d 100644
--- a/lib/pipeline/rte_swx_pipeline.c
+++ b/lib/pipeline/rte_swx_pipeline.c
@@ -7636,4 +7636,5 @@ table_build_free(struct rte_swx_pipeline *p)
 
 		free(p->table_stats);
+		p->table_stats = NULL;
 	}
 }
@@ -8444,4 +8445,5 @@ learner_build_free(struct rte_swx_pipeline *p)
 
 		free(p->learner_stats);
+		p->learner_stats = NULL;
 	}
 }
-- 
2.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-07-20 16:17:56.423214272 +0100
+++ 0010-pipeline-fix-double-free-for-table-stats.patch	2023-07-20 16:17:54.449749642 +0100
@@ -1 +1 @@
-From 2d9e10932d535ea553081b489a25f6fce7ec7996 Mon Sep 17 00:00:00 2001
+From e531825d4eb211c97b402b602bafe5dc6de5e740 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2d9e10932d535ea553081b489a25f6fce7ec7996 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index dea1378095..da37eda231 100644
+index 8d5073cf19..25b5b0955d 100644
@@ -26 +27 @@
-@@ -8666,4 +8666,5 @@ table_build_free(struct rte_swx_pipeline *p)
+@@ -7636,4 +7636,5 @@ table_build_free(struct rte_swx_pipeline *p)
@@ -32 +33 @@
-@@ -9580,4 +9581,5 @@ learner_build_free(struct rte_swx_pipeline *p)
+@@ -8444,4 +8445,5 @@ learner_build_free(struct rte_swx_pipeline *p)



More information about the stable mailing list