patch 'bus/fslmc: verify strdup return' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:33:46 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/5a753bd6ddef093ad394bb8859db1cc57656bebe

Thanks.

Kevin

---
>From 5a753bd6ddef093ad394bb8859db1cc57656bebe Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Fri, 10 Nov 2023 10:01:04 +0000
Subject: [PATCH] bus/fslmc: verify strdup return

[ upstream commit 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 ]

Add verify strdup return value logic.

Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Acked-by: Sachin Saxena <sachin.saxena at nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 53fd75539e..2993af2563 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -639,4 +639,8 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
 	/* Now that name=device_name format is available, split */
 	dup = strdup(str);
+	if (dup == NULL) {
+		DPAA2_BUS_DEBUG("Dup string (%s) failed!\n", str);
+		return NULL;
+	}
 	dev_name = dup + strlen("name=");
 
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:55.043511419 +0000
+++ 0013-bus-fslmc-verify-strdup-return.patch	2024-03-05 14:08:54.623520694 +0000
@@ -1 +1 @@
-From 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 Mon Sep 17 00:00:00 2001
+From 5a753bd6ddef093ad394bb8859db1cc57656bebe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index b1af47ca7d..c155f4a2fd 100644
+index 53fd75539e..2993af2563 100644
@@ -21 +22 @@
-@@ -636,4 +636,8 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -639,4 +639,8 @@ fslmc_bus_dev_iterate(const void *start, const char *str,



More information about the stable mailing list