patch 'trace: fix leak with regexp' has been queued to stable release 20.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Sat Nov 5 18:11:02 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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/07/22. 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/207496d05733265802965e2f80419d884aa3a905

Thanks.

Luca Boccassi

---
>From 207496d05733265802965e2f80419d884aa3a905 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 14 Sep 2022 16:36:36 +0200
Subject: [PATCH] trace: fix leak with regexp

[ upstream commit b980ced067d226d9f43d0c77bf07b6e6bd78f166 ]

The precompiled buffer initialised in regcomp must be freed before
leaving rte_trace_regexp.

Fixes: 84c4fae4628f ("trace: implement operation APIs")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Jerin Jacob <jerinj at marvell.com>
Acked-by: Sunil Kumar Kori <skori at marvell.com>
---
 lib/librte_eal/common/eal_common_trace.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c
index 3f4b5c5876..22b7fcd33b 100644
--- a/lib/librte_eal/common/eal_common_trace.c
+++ b/lib/librte_eal/common/eal_common_trace.c
@@ -218,8 +218,10 @@ rte_trace_regexp(const char *regex, bool enable)
 				rc = rte_trace_point_disable(tp->handle);
 			found = 1;
 		}
-		if (rc < 0)
-			return rc;
+		if (rc < 0) {
+			found = 0;
+			break;
+		}
 	}
 	regfree(&r);
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-05 17:11:09.065718137 +0000
+++ 0003-trace-fix-leak-with-regexp.patch	2022-11-05 17:11:08.558940152 +0000
@@ -1 +1 @@
-From b980ced067d226d9f43d0c77bf07b6e6bd78f166 Mon Sep 17 00:00:00 2001
+From 207496d05733265802965e2f80419d884aa3a905 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b980ced067d226d9f43d0c77bf07b6e6bd78f166 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -16 +17 @@
- lib/eal/common/eal_common_trace.c | 6 ++++--
+ lib/librte_eal/common/eal_common_trace.c | 6 ++++--
@@ -19,4 +20,4 @@
-diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c
-index 1b86f5d2d2..1db11e3e14 100644
---- a/lib/eal/common/eal_common_trace.c
-+++ b/lib/eal/common/eal_common_trace.c
+diff --git a/lib/librte_eal/common/eal_common_trace.c b/lib/librte_eal/common/eal_common_trace.c
+index 3f4b5c5876..22b7fcd33b 100644
+--- a/lib/librte_eal/common/eal_common_trace.c
++++ b/lib/librte_eal/common/eal_common_trace.c


More information about the stable mailing list