Re: [PATCH v5] driver core: enforce device_lock for driver_match_device()
From: Gui-Dong Han
Date: Tue Jan 20 2026 - 09:05:13 EST
On Tue, Jan 20, 2026 at 9:48 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Tue, Jan 20, 2026 at 09:30:53PM +0800, Gui-Dong Han wrote:
> > On Tue, Jan 20, 2026 at 9:22 PM Mark Brown <broonie@xxxxxxxxxx> 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:
>
> > I verified this on x86 without issues, but it seems I missed this
> > regression on Arm platforms. I will investigate the cause of this hang
> > immediately.
>
> Thanks. It's not all platforms - in particular none of the main
> emulation platforms triggered the issue unfortunately. It seems to be a
> fairly limited subset of physical platforms that are impacted.
I am quite puzzled by this. My suspicion is a deadlock, possibly
involving PM/power domain operations within the match() callback
triggering a lock dependency.
However, since __device_attach_driver (the device-initiated binding
path) has always held device_lock while calling match(), it is strange
that this locking pattern causes issues now in the __driver_attach
(driver-initiated) path. The specific timing or device state during
late binding must be the key factor.
I do not have access to the affected hardware, but I will attempt to
reproduce it on QEMU Arm and perform a code audit of the relevant bus
match functions.
If anyone has insights into potential lock conflicts specific to this
path, please share.
Thanks.