diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-03-07 08:16:48 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-03-07 08:16:48 -0800 |
| commit | e33aafac04bdd8f03300651916386e296eb8020a (patch) | |
| tree | 0e92f93317fcbf18f3aa766c42692aa1fe382d98 /include | |
| parent | 0f912c8917e810a4aa81d122a8e7d0a918505ab9 (diff) | |
| parent | 9de68394a61528d40f575c3e6719cc75c56f62c3 (diff) | |
Merge tag 'driver-core-7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core
Pull driver core fix from Danilo Krummrich:
- Revert "driver core: enforce device_lock for driver_match_device()":
When a device is already present in the system and a driver is
registered on the same bus, we iterate over all devices registered on
this bus to see if one of them matches. If we come across an already
bound one where the corresponding driver crashed while holding the
device lock (e.g. in probe()) we can't make any progress anymore.
Thus, revert and clarify that an implementer of struct bus_type must
not expect match() to be called with the device lock held.
* tag 'driver-core-7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core:
Revert "driver core: enforce device_lock for driver_match_device()"
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/device/bus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index 99c3c83ea520..63de5f053c33 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -35,6 +35,8 @@ struct fwnode_handle; * otherwise. It may also return error code if determining that * the driver supports the device is not possible. In case of * -EPROBE_DEFER it will queue the device for deferred probing. + * Note: This callback may be invoked with or without the device + * lock held. * @uevent: Called when a device is added, removed, or a few other things * that generate uevents to add the environment variables. * @probe: Called when a new device or driver add to this bus, and callback |
