linux/drivers/s390/cio
Danilo Krummrich ac4d8bb6e2 s390/cio: 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: ebc3d17915 ("s390/cio: introduce driver_override on the css bus")
Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Link: https://patch.msgid.link/20260324005919.2408620-10-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
2026-04-04 00:48:40 +02:00
..
airq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blacklist.c kernel.h: drop hex.h and update all hex.h users 2026-01-20 19:44:19 -08:00
blacklist.h
ccwgroup.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ccwreq.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
chp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
chp.h s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
chsc_sch.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
chsc_sch.h
chsc.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
chsc.h s390/cio: Externalize full CMG characteristics 2024-11-13 14:31:31 +01:00
cio_debug.h s390/cio: introduce CIO debugfs directory 2021-03-22 11:36:04 +01:00
cio_debugfs.c s390/cio: introduce CIO debugfs directory 2021-03-22 11:36:04 +01:00
cio_inject.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
cio_inject.h s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
cio.c s390: Remove KMSG_COMPONENT macro 2025-11-24 11:45:21 +01:00
cio.h s390/cio: use generic driver_override infrastructure 2026-04-04 00:48:40 +02:00
cmf.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
crw.c s390/cio: Remove outdated email address 2025-02-18 18:53:47 +01:00
css.c s390/cio: use generic driver_override infrastructure 2026-04-04 00:48:40 +02:00
css.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
device_fsm.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
device_id.c s390: Convert MACHINE_IS_[LPAR|VM|KVM], etc, machine_is_[lpar|vm|kvm]() 2025-03-04 17:18:07 +01:00
device_ops.c s390/cio: Use array indices instead of pointer arithmetic 2025-01-03 11:00:53 +01:00
device_pgid.c s390/cio: use new address translation helpers 2024-03-13 09:23:47 +01:00
device_status.c s390/cio: Use scnprintf() instead of sprintf() 2025-10-21 10:17:30 +02:00
device.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
device.h s390/cio: remove pm support from ccw bus driver 2020-12-02 18:19:25 +01:00
eadm_sch.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
eadm_sch.h
fcx.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
idset.c bitmap: introduce generic optimized bitmap_size() 2024-04-01 10:49:28 +01:00
idset.h
io_sch.h s390/cio: remove pm support from ccw bus driver 2020-12-02 18:19:25 +01:00
ioasm.c s390/cio/ioasm: Fix __xsch() condition code handling 2025-09-29 13:52:08 +02:00
ioasm.h
isc.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
itcw.c s390/drivers: Explicitly include <linux/export.h> 2025-06-17 18:18:02 +02:00
Makefile s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
orb.h s390/cio: use bitwise types to allow for type checking 2024-03-13 09:23:46 +01:00
qdio_debug.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qdio_debug.h
qdio_main.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
qdio_setup.c s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place 2025-01-03 11:00:53 +01:00
qdio_thinint.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
qdio.h s390/qdio: Move memory alloc/pointer arithmetic for slib and sl into one place 2025-01-03 11:00:53 +01:00
scm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
trace.c
trace.h s390/drivers: Replace S390_lowcore by get_lowcore() 2024-06-18 17:01:33 +02:00
vfio_ccw_async.c vfio/ccw: Remove private->mdev 2022-07-07 14:06:12 -06:00
vfio_ccw_chp.c eventfd: simplify eventfd_signal() 2023-11-28 14:08:38 +01:00
vfio_ccw_cp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vfio_ccw_cp.h vfio/ccw: simplify the cp_get_orb interface 2023-01-09 14:34:07 +01:00
vfio_ccw_drv.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vfio_ccw_fsm.c s390/vfio_ccw: fix virtual vs physical address confusion 2024-03-13 09:23:45 +01:00
vfio_ccw_ops.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
vfio_ccw_private.h s390/vfio-ccw: Make mdev_types not look like a fake flex array 2025-02-18 18:53:47 +01:00
vfio_ccw_trace.c vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00
vfio_ccw_trace.h vfio-ccw: Add trace for CRW event 2020-06-03 11:28:19 +02:00