From: David Marchand <david.marchand@redhat.com>
To: hemant.agrawal@nxp.com, dev@dpdk.org
Subject: [PATCH v2 09/16] bus/fslmc: fix interrupt leak in DPIO cleanup
Date: Mon, 26 Oct 2026 19:10:23 +0100 [thread overview]
Message-ID: <20261026181031.304100-10-david.marchand@redhat.com> (raw)
In-Reply-To: <20261026181031.304100-1-david.marchand@redhat.com>
The interrupt handle in the DPIO device is separate from the bus device
object handle. The cleanup code was leaking this handle and the FD it
carries.
Fixes: 274fd921ff7f ("bus/fslmc: support close operation")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- fixed FD leaks,
---
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 9fe449ed38..2e8c660acf 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -476,6 +476,10 @@ dpaa2_close_dpio_device(int object_id)
rte_free(dpio_dev->dpio);
}
TAILQ_REMOVE(&dpio_dev_list, dpio_dev, next);
+ rte_intr_fd_close(dpio_dev->intr_handle);
+ /* dev_fd is closed by caller, clear reference here. */
+ rte_intr_dev_fd_set(dpio_dev->intr_handle, -1);
+ rte_intr_instance_free(dpio_dev->intr_handle);
rte_free(dpio_dev);
}
}
@@ -668,6 +672,9 @@ dpaa2_create_dpio_device(int vdev_fd,
rte_free(dpio_dev->dpio);
}
+ rte_intr_fd_close(dpio_dev->intr_handle);
+ /* dev_fd is closed by caller, clear reference here. */
+ rte_intr_dev_fd_set(dpio_dev->intr_handle, -1);
rte_intr_instance_free(dpio_dev->intr_handle);
rte_free(dpio_dev);
@@ -680,6 +687,9 @@ dpaa2_create_dpio_device(int vdev_fd,
dpio_dev->token);
rte_free(dpio_dev->dpio);
}
+ rte_intr_fd_close(dpio_dev->intr_handle);
+ /* dev_fd is closed by caller, clear reference here. */
+ rte_intr_dev_fd_set(dpio_dev->intr_handle, -1);
rte_intr_instance_free(dpio_dev->intr_handle);
rte_free(dpio_dev);
}
--
2.54.0
next prev parent reply other threads:[~2026-10-26 18:11 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 13:53 [RFC 00/11] Device unplug and bus cleanup refactoring for NXP David Marchand
2026-07-23 13:53 ` [RFC 01/11] drivers/bus: cleanup device freeing in NXP bus scan David Marchand
2026-07-23 13:53 ` [RFC 02/11] bus/dpaa: allocate interrupt during probing David Marchand
2026-07-23 13:53 ` [RFC 03/11] bus/dpaa: support unplug and use generic cleanup David Marchand
2026-07-23 13:53 ` [RFC 04/11] bus/fslmc: fix memory leaks in scan David Marchand
2026-07-23 13:53 ` [RFC 05/11] bus/fslmc: fix per type device count David Marchand
2026-07-23 13:53 ` [RFC 06/11] bus/fslmc: simplify device parsing in scan David Marchand
2026-07-23 13:53 ` [RFC 07/11] bus/fslmc: refactor device filtering for multiprocess David Marchand
2026-07-23 13:53 ` [RFC 08/11] bus/fslmc: move unplug for some device out of VFIO David Marchand
2026-07-23 13:53 ` [RFC 09/11] bus/fslmc: call VFIO setup for some device from bus layer David Marchand
2026-07-23 13:53 ` [RFC 10/11] bus/fslmc: allocate interrupt during probing David Marchand
2026-07-23 13:53 ` [RFC 11/11] bus/fslmc: use generic cleanup David Marchand
2026-07-23 14:11 ` [RFC 00/11] Device unplug and bus cleanup refactoring for NXP Hemant Agrawal
2026-09-03 13:30 ` David Marchand
2026-09-08 14:20 ` Hemant Agrawal
2026-09-10 11:54 ` David Marchand
2026-08-11 20:09 ` Stephen Hemminger
2026-09-17 7:49 ` [RFC v2 00/16] " David Marchand
2026-09-17 7:49 ` [RFC v2 01/16] drivers/bus: cleanup device freeing in NXP bus scan David Marchand
2026-09-17 7:49 ` [RFC v2 02/16] drivers/bus: fix FD leak during scan in NXP drivers David Marchand
2026-09-17 7:49 ` [RFC v2 03/16] bus/dpaa: allocate interrupt during probing David Marchand
2026-09-17 7:49 ` [RFC v2 04/16] bus/dpaa: support unplug and use generic cleanup David Marchand
2026-09-17 7:49 ` [RFC v2 05/16] bus/fslmc: fix device name leak David Marchand
2026-09-17 7:49 ` [RFC v2 06/16] bus/fslmc: fix memory leaks in scan David Marchand
2026-09-17 7:49 ` [RFC v2 07/16] bus/fslmc: fix per type device count David Marchand
2026-09-17 7:49 ` [RFC v2 08/16] bus/fslmc: fix some VFIO device FD and memory leaks David Marchand
2026-09-17 7:49 ` [RFC v2 09/16] bus/fslmc: fix interrupt leak in DPIO cleanup David Marchand
2026-09-17 7:49 ` [RFC v2 10/16] bus/fslmc: simplify device parsing in scan David Marchand
2026-09-17 7:49 ` [RFC v2 11/16] bus/fslmc: release resources on scan failure David Marchand
2026-09-17 7:49 ` [RFC v2 12/16] bus/fslmc: refactor device filtering for multiprocess David Marchand
2026-09-17 7:49 ` [RFC v2 13/16] bus/fslmc: move unplug for some device out of VFIO David Marchand
2026-09-17 7:49 ` [RFC v2 14/16] bus/fslmc: call VFIO setup for some device from bus layer David Marchand
2026-09-17 7:49 ` [RFC v2 15/16] bus/fslmc: allocate interrupt during probing David Marchand
2026-09-17 7:49 ` [RFC v2 16/16] bus/fslmc: use generic cleanup David Marchand
2026-09-24 6:46 ` [RFC v2 00/16] Device unplug and bus cleanup refactoring for NXP David Marchand
2026-09-24 6:53 ` Hemant Agrawal
2026-10-14 17:39 ` [PATCH " David Marchand
2026-10-14 17:39 ` [PATCH 01/16] drivers/bus: cleanup device freeing in NXP bus scan David Marchand
2026-10-14 17:39 ` [PATCH 02/16] drivers/bus: fix FD leak during scan in NXP drivers David Marchand
2026-10-14 17:39 ` [PATCH 03/16] bus/dpaa: allocate interrupt during probing David Marchand
2026-10-14 17:39 ` [PATCH 04/16] bus/dpaa: support unplug and use generic cleanup David Marchand
2026-10-14 17:39 ` [PATCH 05/16] bus/fslmc: fix device name leak David Marchand
2026-10-14 17:39 ` [PATCH 06/16] bus/fslmc: fix memory leaks in scan David Marchand
2026-10-14 17:39 ` [PATCH 07/16] bus/fslmc: fix per type device count David Marchand
2026-10-14 17:39 ` [PATCH 08/16] bus/fslmc: fix some VFIO device FD and memory leaks David Marchand
2026-10-14 17:39 ` [PATCH 09/16] bus/fslmc: fix interrupt leak in DPIO cleanup David Marchand
2026-10-14 17:39 ` [PATCH 10/16] bus/fslmc: simplify device parsing in scan David Marchand
2026-10-14 17:39 ` [PATCH 11/16] bus/fslmc: release resources on probe failure David Marchand
2026-10-14 17:39 ` [PATCH 12/16] bus/fslmc: refactor device filtering for multiprocess David Marchand
2026-10-14 17:39 ` [PATCH 13/16] bus/fslmc: move unplug for some device out of VFIO David Marchand
2026-10-14 17:39 ` [PATCH 14/16] bus/fslmc: call VFIO setup for some device from bus layer David Marchand
2026-10-14 17:39 ` [PATCH 15/16] bus/fslmc: allocate interrupt during probing David Marchand
2026-10-14 17:39 ` [PATCH 16/16] bus/fslmc: use generic cleanup David Marchand
2026-10-18 10:34 ` [PATCH 00/16] Device unplug and bus cleanup refactoring for NXP Hemant Agrawal
2026-10-26 9:41 ` Prashant Gupta
2026-10-26 18:10 ` David Marchand
2026-10-27 11:20 ` [EXT] " Prashant Gupta
2026-10-26 18:10 ` [PATCH v2 " David Marchand
2026-10-26 18:10 ` [PATCH v2 01/16] drivers/bus: cleanup device freeing in NXP bus scan David Marchand
2026-10-26 18:10 ` [PATCH v2 02/16] drivers/bus: fix FD leak during scan in NXP drivers David Marchand
2026-10-26 18:10 ` [PATCH v2 03/16] bus/dpaa: allocate interrupt during probing David Marchand
2026-10-26 18:10 ` [PATCH v2 04/16] bus/dpaa: support unplug and use generic cleanup David Marchand
2026-10-26 18:10 ` [PATCH v2 05/16] bus/fslmc: fix device name leak David Marchand
2026-10-26 18:10 ` [PATCH v2 06/16] bus/fslmc: fix memory leaks in scan David Marchand
2026-10-26 18:10 ` [PATCH v2 07/16] bus/fslmc: fix per type device count David Marchand
2026-10-26 18:10 ` [PATCH v2 08/16] bus/fslmc: fix some VFIO device FD and memory leaks David Marchand
2026-10-26 18:10 ` David Marchand [this message]
2026-10-26 18:10 ` [PATCH v2 10/16] bus/fslmc: simplify device parsing in scan David Marchand
2026-10-26 18:10 ` [PATCH v2 11/16] bus/fslmc: release resources on probe failure David Marchand
2026-10-26 18:10 ` [PATCH v2 12/16] bus/fslmc: refactor device filtering for multiprocess David Marchand
2026-10-26 18:10 ` [PATCH v2 13/16] bus/fslmc: move unplug for some device out of VFIO David Marchand
2026-10-26 18:10 ` [PATCH v2 14/16] bus/fslmc: call VFIO setup for some device from bus layer David Marchand
2026-10-26 18:10 ` [PATCH v2 15/16] bus/fslmc: allocate interrupt during probing David Marchand
2026-10-26 18:10 ` [PATCH v2 16/16] bus/fslmc: use generic cleanup David Marchand
2026-10-27 12:36 ` [PATCH v2 00/16] Device unplug and bus cleanup refactoring for NXP Hemant Agrawal
2026-10-27 16:44 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261026181031.304100-10-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox