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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 7 02:30:40 CET 2024


Hi,

FYI, your patch has been queued to stable release 22.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 03/09/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From f0becad29466ec4259d3b3a3f1f3c5d489db9e81 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 57bfb5111a..89f0f329c0 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -634,6 +634,10 @@ 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=");
 
 	if (start != NULL) {
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-07 01:05:36.969041857 +0000
+++ 0023-bus-fslmc-verify-strdup-return.patch	2024-03-07 01:05:34.702937979 +0000
@@ -1 +1 @@
-From 180d52bc7de2395ce9f4e5a707f4d8bb52be2fe4 Mon Sep 17 00:00:00 2001
+From f0becad29466ec4259d3b3a3f1f3c5d489db9e81 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 57bfb5111a..89f0f329c0 100644
@@ -21 +22 @@
-@@ -635,6 +635,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -634,6 +634,10 @@ fslmc_bus_dev_iterate(const void *start, const char *str,


More information about the stable mailing list