linux/drivers/cdx
Danilo Krummrich d541aa1897 cdx: use generic driver_override infrastructure
When a driver is probed through __driver_attach(), the bus' match()
callback is called without the device lock held, thus accessing the
driver_override field without a lock, which can cause a UAF.

Fix this by using the driver-core driver_override infrastructure taking
care of proper locking internally.

Note that calling match() from __driver_attach() without the device lock
held is intentional. [1]

Link: https://lore.kernel.org/driver-core/DGRGTIRHA62X.3RY09D9SOK77P@kernel.org/ [1]
Reported-by: Gui-Dong Han <hanguidong02@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220789
Fixes: 2959ab2470 ("cdx: add the cdx bus driver")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260505133935.3772495-3-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-05-30 22:25:32 +02:00
..
controller Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cdx_msi.c cdx: Fix device node reference leak in cdx_msi_domain_init 2025-09-06 19:45:22 +02:00
cdx.c cdx: use generic driver_override infrastructure 2026-05-30 22:25:32 +02:00
cdx.h cdx: add MSI support for CDX bus 2024-03-07 21:52:03 +00:00
Kconfig cdx: don't select CONFIG_GENERIC_MSI_IRQ 2025-08-27 12:14:12 -06:00
Makefile module: Convert default symbol namespace to string literal 2024-12-03 08:22:25 -08:00