Danilo Krummrich
81d6f7c3a7
s390/ap: use generic driver_override infrastructure
...
When the AP masks are updated via apmask_store() or aqmask_store(),
ap_bus_revise_bindings() is called after ap_attr_mutex has been
released.
This calls __ap_revise_reserved(), which accesses the driver_override
field without holding any lock, racing against a concurrent
driver_override_store() that may free the old string, resulting in a
potential UAF.
Fix this by using the driver-core driver_override infrastructure, which
protects all accesses with an internal spinlock.
Note that unlike most other buses, the AP bus does not check
driver_override in its match() callback; the override is checked in
ap_device_probe() and __ap_revise_reserved() instead.
Also note that we do not enable the driver_override feature of struct
bus_type, as AP - in contrast to most other buses - passes "" to
sysfs_emit() when the driver_override pointer is NULL. Thus, printing
"\n" instead of "(null)\n".
Additionally, AP has a custom counter that is modified in the
corresponding custom driver_override_store().
Fixes: d38a87d7c0 ("s390/ap: Support driver_override for AP queue devices")
Tested-by: Holger Dengler <dengler@linux.ibm.com >
Reviewed-by: Holger Dengler <dengler@linux.ibm.com >
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com >
Link: https://patch.msgid.link/20260324005919.2408620-11-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org >
2026-04-04 00:49:22 +02:00
..
2026-03-10 11:46:40 -07:00
2026-02-21 17:09:51 -08:00
2026-03-19 14:57:06 +01:00
2026-02-21 17:09:51 -08:00
2026-02-26 21:34:14 -08:00
2026-03-20 09:59:30 +01:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-04-04 00:33:49 +02:00
2026-02-21 17:09:51 -08:00
2026-03-13 10:13:06 -07:00
2026-03-12 15:29:29 -04:00
2026-03-26 22:00:59 +01:00
2026-02-06 19:54:40 +00:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-26 14:34:21 -08:00
2026-03-17 20:30:57 +01:00
2026-02-22 08:26:33 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-25 14:39:19 +01:00
2026-03-10 16:03:02 +01:00
2026-03-18 15:50:29 -07:00
2026-02-24 08:33:30 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 20:03:00 -08:00
2026-02-26 08:00:13 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-02-22 08:26:33 -08:00
2026-03-16 19:29:45 -07:00
2026-03-18 08:28:54 -07:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-11 16:23:32 +01:00
2026-02-23 11:49:23 +01:00
2026-03-21 02:17:59 +10:00
2026-02-21 20:03:00 -08:00
2026-03-17 13:55:51 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-18 16:18:49 +00:00
2026-03-21 16:59:09 -07:00
2026-02-10 20:45:30 -08:00
2026-02-21 20:03:00 -08:00
2026-03-26 22:00:59 +01:00
2026-03-11 22:50:29 +01:00
2026-01-07 21:17:43 +01:00
2026-03-14 16:25:10 -07:00
2026-02-26 04:58:24 -05:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-17 14:02:02 +01:00
2026-02-21 20:03:00 -08:00
2026-03-17 11:16:15 +01:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-02-22 08:26:33 -08:00
2026-03-04 08:12:06 -08:00
2026-02-21 17:09:51 -08:00
2026-02-22 08:26:33 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 20:03:00 -08:00
2026-02-27 16:33:07 +01:00
2026-03-16 16:08:54 +01:00
2026-02-21 17:09:51 -08:00
2026-03-18 18:08:25 +01:00
2026-02-21 17:09:51 -08:00
2026-03-26 22:00:59 +01:00
2026-03-18 17:20:51 -07:00
2026-02-21 11:02:58 -08:00
2026-02-21 17:09:51 -08:00
2026-03-09 09:38:22 -05:00
2026-03-13 10:13:06 -07:00
2026-02-21 17:09:51 -08:00
2026-03-26 22:00:59 +01:00
2026-02-21 20:03:00 -08:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-04-04 00:44:30 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-26 23:41:04 +01:00
2026-04-04 00:45:14 +02:00
2026-03-20 09:46:15 -07:00
2026-02-21 17:09:51 -08:00
2026-03-04 09:16:41 +01:00
2026-02-22 08:26:33 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-10 14:52:42 +00:00
2026-03-05 10:18:23 -07:00
2026-03-13 14:17:30 +00:00
2026-02-23 17:03:28 +01:00
2026-02-21 17:09:51 -08:00
2026-02-22 09:43:11 -08:00
2026-04-04 00:49:22 +02:00
2026-02-21 17:09:51 -08:00
2026-03-15 13:15:39 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-17 20:30:57 +01:00
2026-03-22 23:13:33 +01:00
2026-04-02 16:15:23 +02:00
2026-03-26 22:00:59 +01:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-24 10:01:20 -08:00
2026-02-28 20:41:52 -05:00
2026-02-21 17:09:51 -08:00
2026-03-03 09:03:04 +01:00
2026-02-22 08:26:33 -08:00
2026-02-21 20:03:00 -08:00
2026-03-13 09:15:58 +01:00
2026-03-07 11:08:39 -05:00
2026-02-21 17:09:51 -08:00
2026-03-13 18:19:07 +01:00
2026-04-04 00:47:50 +02:00
2026-04-04 00:44:30 +02:00
2026-02-22 08:26:33 -08:00
2026-03-05 17:35:12 +01:00
2026-02-22 08:26:33 -08:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-04-04 00:44:30 +02:00
2026-02-21 17:09:51 -08:00
2025-12-06 18:52:00 -08:00
2026-02-04 20:45:26 +05:30