Re: [PATCH v5] driver core: enforce device_lock for driver_match_device()

From: David Heidelberg

Date: Wed Jan 21 2026 - 02:40:41 EST


On 20/01/2026 14:22, Mark Brown wrote:
On Wed, Jan 14, 2026 at 12:28:43AM +0800, Gui-Dong Han wrote:
Currently, driver_match_device() is called from three sites. One site
(__device_attach_driver) holds device_lock(dev), but the other two
(bind_store and __driver_attach) do not. This inconsistency means that
bus match() callbacks are not guaranteed to be called with the lock
held.

I'm seeing boot hangs on Arm Juno in next/pending-fixes which bisect to
this commit. The boot grinds to a halt near the end of boot:

[ 2.570549] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.618301] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 2.623547] msm_serial: driver initialized
[ 2.624058] SuperH (H)SCI(F) driver initialized
[ 2.624312] STM32 USART driver initialized


Similar outcome on sdm845-based:
- Pixel 3
- OnePlus 6T

Reverting unblock the boot process.

David

--
David Heidelberg