This series converts four remaining buses from bus-private
driver_override handling to the generic driver-core infrastructure:
- AMBA
- RPMSG
- VMBUS
- CDX
These buses still keep private driver_override storage and read it
directly from their match paths. However, bus match() callbacks can be
reached from __driver_attach() without the device lock held, so those
raw reads can race with updates that replace and free the override
string.
The driver core already provides generic driver_override storage and
matching helpers with the required internal locking. Other buses have
already been converted to that model. This series switches the
remaining users above to the same infrastructure by:
- removing bus-private driver_override storage
- dropping bus-local driver_override sysfs handling
- enabling struct bus_type.driver_override
- using device_match_driver_override() in match paths
Bus-specific behavior is preserved where needed:
- VMBUS keeps its dummy-id fallback for override-based binding
- CDX keeps its override_only matching semantics
- RPMSG converts its in-kernel override registration path to
device_set_driver_override() and drops the old transport-local
frees of bus-private override storage
Before preparing this v2 series, I rechecked the affected source paths
against v7.1-rc6. I also reran the existing report-specific no-device
KCSAN stand-ins on a local v7.1-rc6 guest for all four buses. Those
reruns again produced target-stack reports for the corresponding
driver_override update/match paths.
That runtime validation is still stand-in based rather than direct
hardware execution, but it reuses the real driver_set_override() helper
from the running v7.1-rc6 guest kernel and preserves the relevant
patch-local reader/writer contracts and caller chains.
Since v1:
- reworked the series around the generic driver_override
infrastructure instead of trying to serialize bus match() with
device_lock(dev)
- split the changes by bus
- preserved VMBUS dummy-id fallback behavior explicitly
- preserved CDX override_only matching semantics explicitly
- converted the RPMSG in-kernel override registration path to the
core helper
- reran the four report-specific no-device KCSAN stand-ins on a
local v7.1-rc6 guest and refreshed the validation basis
- refreshed the commit messages accordingly
Runyu Xiao (4):
amba: use generic driver_override infrastructure
rpmsg: core: use generic driver_override infrastructure
vmbus: use generic driver_override infrastructure
cdx: use generic driver_override infrastructure
drivers/amba/bus.c | 35 +++++--------------------------
drivers/cdx/cdx.c | 40 +++++-------------------------------
drivers/hv/vmbus_drv.c | 36 +++++---------------------------
drivers/rpmsg/qcom_glink_native.c | 2 --
drivers/rpmsg/rpmsg_core.c | 41 ++++++-------------------------------
drivers/rpmsg/virtio_rpmsg_bus.c | 1 -
include/linux/amba/bus.h | 5 -----
include/linux/cdx/cdx_bus.h | 1 -
include/linux/hyperv.h | 6 ------
include/linux/rpmsg.h | 4 ----
10 files changed, 21 insertions(+), 150 deletions(-)
--
2.34.1