* [PATCH] bus/auxiliary: fix auxiliary device port destruction
@ 2025-07-07 10:06 Gregory Etelson
0 siblings, 0 replies; only message in thread
From: Gregory Etelson @ 2025-07-07 10:06 UTC (permalink / raw)
To: dev
Cc: getelson, ,
rasland, stable, Dariusz Sosnowski, Parav Pandit, Xueming Li,
Thomas Monjalon, Andrew Rybchenko
DPDK auxiliary bus first creates a list of known devices in the
`auxiliary_bus.device_list` and then tries to attach a driver to each
device on that list.
If the driver attachment has failed, a device will remain on the list.
The device destruction did not validate driver existence and
crashed.
The patch validates auxiliary device driver before accessing
driver related resources.
Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/bus/auxiliary/auxiliary_common.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index 5c6c6b0ef2..ac766e283e 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -163,6 +163,8 @@ rte_auxiliary_driver_remove_dev(struct rte_auxiliary_device *dev)
return -EINVAL;
drv = dev->driver;
+ if (drv == NULL)
+ return 0;
AUXILIARY_LOG(DEBUG, "Driver %s remove auxiliary device %s on NUMA node %i",
drv->driver.name, dev->name, dev->device.numa_node);
--
2.48.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-07-07 10:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-07 10:06 [PATCH] bus/auxiliary: fix auxiliary device port destruction Gregory Etelson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).