patch 'drivers/bus: fix FD leak during scan in NXP drivers' has been queued to stable release 24.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 5 17:41:28 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.9

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/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From bb510e4e221ac1647d53e891a15c4c9b952c970d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Thu, 10 Sep 2026 14:06:17 +0200
Subject: [PATCH] drivers/bus: fix FD leak during scan in NXP drivers

[ upstream commit a54a5497c7f8ea9c69cf46039f021c3fef78c988 ]

In theory, if the interrupt handle setup fails, an eventfd gets leaked.

In practice, as long as the interrupt handle is valid, those calls can
not fail, but this could get broken in the future so it is better to
handle this error branch correctly.

Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle")

Signed-off-by: David Marchand <david.marchand at redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal at nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c    | 11 +++++++----
 drivers/bus/fslmc/fslmc_vfio.c | 16 +++++++++-------
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 0d49540ded2..b94d5ce88ab 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -644,11 +644,14 @@ static int rte_dpaa_setup_intr(struct rte_intr_handle *intr_handle)
 		return errno;
 	}
 
-	if (rte_intr_fd_set(intr_handle, fd))
-		return rte_errno;
+	if (rte_intr_fd_set(intr_handle, fd) ||
+			rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_EXT)) {
+		int err = rte_errno;
 
-	if (rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_EXT))
-		return rte_errno;
+		close(fd);
+		rte_intr_fd_set(intr_handle, -1);
+		return err;
+	}
 
 	return 0;
 }
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 2c866dc177d..6c353cd1c4e 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -1356,14 +1356,16 @@ rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
 			return fd;
 		}
 
-		if (rte_intr_fd_set(intr_handle, fd))
-			return -rte_errno;
+		if (rte_intr_fd_set(intr_handle, fd) ||
+				rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_VFIO_MSI) ||
+				rte_intr_dev_fd_set(intr_handle, vfio_dev_fd)) {
+			int error = -rte_errno;
 
-		if (rte_intr_type_set(intr_handle, RTE_INTR_HANDLE_VFIO_MSI))
-			return -rte_errno;
-
-		if (rte_intr_dev_fd_set(intr_handle, vfio_dev_fd))
-			return -rte_errno;
+			close(fd);
+			rte_intr_fd_set(intr_handle, -1);
+			rte_intr_dev_fd_set(intr_handle, -1);
+			return error;
+		}
 
 		return 0;
 	}
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-11-05 16:42:45.109650550 +0000
+++ 0001-drivers-bus-fix-FD-leak-during-scan-in-NXP-drivers.patch	2026-11-05 16:42:44.881059591 +0000
@@ -1 +1 @@
-From a54a5497c7f8ea9c69cf46039f021c3fef78c988 Mon Sep 17 00:00:00 2001
+From bb510e4e221ac1647d53e891a15c4c9b952c970d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a54a5497c7f8ea9c69cf46039f021c3fef78c988 ]
+
@@ -22 +24 @@
-index 06962a5b29..5df2dff8f2 100644
+index 0d49540ded2..b94d5ce88ab 100644
@@ -25 +27 @@
-@@ -648,11 +648,14 @@ static int rte_dpaa_setup_intr(struct rte_intr_handle *intr_handle)
+@@ -644,11 +644,14 @@ static int rte_dpaa_setup_intr(struct rte_intr_handle *intr_handle)
@@ -45 +47 @@
-index e9bf6a6c5c..c8b5518956 100644
+index 2c866dc177d..6c353cd1c4e 100644
@@ -48 +50 @@
-@@ -1382,14 +1382,16 @@ rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,
+@@ -1356,14 +1356,16 @@ rte_dpaa2_vfio_setup_intr(struct rte_intr_handle *intr_handle,


More information about the stable mailing list