patch 'bus/fslmc: fix device name leak' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:02:39 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.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 12/08/26. 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/3570c81ae89e431d96fe43ae4e6b4334cad1de9c

Thanks.

Kevin

---
>From 3570c81ae89e431d96fe43ae4e6b4334cad1de9c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 9 Sep 2026 16:52:11 +0200
Subject: [PATCH] bus/fslmc: fix device name leak

[ upstream commit 39f6ebc48e782027035f2f555dc9c6e215f8e306 ]

The device name allocated during scan was never freed.
Store it to the (unused) name field in the rte_dpaa2_device.

This simplifies the device freeing to a simple free() call later.

Fixes: 828d51d8fc3e ("bus/fslmc: refactor scan and probe functions")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/bus/fslmc/bus_fslmc_driver.h | 4 +---
 drivers/bus/fslmc/fslmc_bus.c        | 8 ++++----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 89abc3c486..ae0c363d14 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -39,6 +39,4 @@ extern "C" {
 struct vfio_device_info;
 
-#define FSLMC_OBJECT_MAX_LEN 32   /**< Length of each device on bus */
-
 #define DPAA2_INVALID_MBUF_SEQN        0
 
@@ -106,5 +104,5 @@ struct rte_dpaa2_device {
 	struct rte_intr_handle *intr_handle; /**< Interrupt handle */
 	struct rte_dpaa2_driver *driver;    /**< Associated driver */
-	char name[FSLMC_OBJECT_MAX_LEN];    /**< DPAA2 Object name*/
+	char name[RTE_DEV_NAME_MAX_LEN];
 };
 
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index 4663b6a6e1..f401b058f3 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -212,10 +212,10 @@ scan_one_fslmc_device(char *dev_name)
 
 	sscanf(t_ptr, "%hu", &dev->object_id);
-	dev->device.name = strdup(dev_name);
-	if (!dev->device.name) {
-		DPAA2_BUS_ERR("Unable to clone device name. Out of memory");
-		ret = -ENOMEM;
+	if (rte_strscpy(dev->name, dev_name, sizeof(dev->name)) < 0) {
+		DPAA2_BUS_ERR("Unable to copy device name: %s", rte_strerror(rte_errno));
+		ret = -rte_errno;
 		goto cleanup;
 	}
+	dev->device.name = dev->name;
 	dev->device.devargs = fslmc_devargs_lookup(dev);
 
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:45.863557335 +0000
+++ 0233-bus-fslmc-fix-device-name-leak.patch	2026-12-03 12:52:39.193938705 +0000
@@ -1 +1 @@
-From 39f6ebc48e782027035f2f555dc9c6e215f8e306 Mon Sep 17 00:00:00 2001
+From 3570c81ae89e431d96fe43ae4e6b4334cad1de9c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39f6ebc48e782027035f2f555dc9c6e215f8e306 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 44f81cf662..ead9d6613c 100644
+index 89abc3c486..ae0c363d14 100644
@@ -25 +26 @@
-@@ -40,6 +40,4 @@ extern "C" {
+@@ -39,6 +39,4 @@ extern "C" {
@@ -32,2 +33 @@
-@@ -102,5 +100,5 @@ struct rte_dpaa2_device {
- 	char ep_name[RTE_DEV_NAME_MAX_LEN];
+@@ -106,5 +104,5 @@ struct rte_dpaa2_device {
@@ -34,0 +35 @@
+ 	struct rte_dpaa2_driver *driver;    /**< Associated driver */
@@ -40 +41 @@
-index 98bd898acb..632142d128 100644
+index 4663b6a6e1..f401b058f3 100644
@@ -43 +44 @@
-@@ -180,10 +180,10 @@ scan_one_fslmc_device(char *dev_name)
+@@ -212,10 +212,10 @@ scan_one_fslmc_device(char *dev_name)
@@ -56 +57 @@
- 	dev->device.devargs = rte_bus_find_devargs(&rte_fslmc_bus, dev_name);
+ 	dev->device.devargs = fslmc_devargs_lookup(dev);



More information about the stable mailing list