patch 'test: verify strdup return' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:33:54 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.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 03/11/24. 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/f30f9a3c5e8b07630ca28b9355cfba56ca9f53ed

Thanks.

Kevin

---
>From f30f9a3c5e8b07630ca28b9355cfba56ca9f53ed Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 10 Nov 2023 10:01:12 +0000
Subject: [PATCH] test: verify strdup return

[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]

Add verify strdup return value logic.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Huisong Li <lihuisong at huawei.com>
---
 app/test/process.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test/process.h b/app/test/process.h
index 5b10cf64df..622cb0b218 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -58,6 +58,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 	else if (pid == 0) {
 		/* make a copy of the arguments to be passed to exec */
-		for (i = 0; i < numargs; i++)
+		for (i = 0; i < numargs; i++) {
 			argv_cpy[i] = strdup(argv[i]);
+			if (argv_cpy[i] == NULL)
+				rte_panic("Error dup args\n");
+		}
 		argv_cpy[i] = NULL;
 		num = numargs;
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.207991337 +0000
+++ 0021-test-verify-strdup-return.patch	2024-03-05 14:08:54.629520709 +0000
@@ -1 +1 @@
-From 68edcacf428994d3088afb6f5278958cc76665da Mon Sep 17 00:00:00 2001
+From f30f9a3c5e8b07630ca28b9355cfba56ca9f53ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 68edcacf428994d3088afb6f5278958cc76665da ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index af7bc3e0de..c576c42349 100644
+index 5b10cf64df..622cb0b218 100644
@@ -21 +22 @@
-@@ -60,6 +60,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
+@@ -58,6 +58,9 @@ process_dup(const char *const argv[], int numargs, const char *env_value)



More information about the stable mailing list