linux/include/linux/amba
Danilo Krummrich 1947229f5f amba: 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: 3cf3857134 ("ARM: 8256/1: driver coamba: add device binding path 'driver_override'")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260505133935.3772495-2-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-05-30 22:25:23 +02:00
..
bus.h amba: use generic driver_override infrastructure 2026-05-30 22:25:23 +02:00
kmi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mmci.h mmc: mmci: Remove custom ios handler 2022-05-04 11:59:09 +02:00
pl08x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pl022.h spi: pl022: Add missing dma_filter field kerneldoc 2024-02-08 21:23:41 +00:00
pl080.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
serial.h tty: serial: amba: Use linux/{bits,bitfield}.h macros 2023-12-15 14:24:12 +01:00
sp810.h Update Viresh Kumar's email address 2015-07-17 16:39:53 -07:00