Re: [PATCH v5] driver core: enforce device_lock for driver_match_device()
From: Gui-Dong Han
Date: Wed Jan 21 2026 - 04:05:16 EST
On Wed, Jan 21, 2026 at 4:56 PM Wang Jiayue <akaieurus@xxxxxxxxx> wrote:
>
> > 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
>
> After partially modifying juno.dts, I managed to roughly emulate kernel
> boot on juno board with qemu and successfully reproduced the boot hang.
> Below is the gdb backtrace:
Great work, thank you very much!
This is a bit puzzling to me. Since __device_driver_lock(dev,
dev->parent) is called a few lines later in __driver_attach(), I
wonder if the original kernel would also deadlock if match() returns
true in such a nested scenario?
Thanks.