[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DFTIAPA8UQS6.355627T7K99R3@kernel.org>
Date: Tue, 20 Jan 2026 16:03:03 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Mark Brown" <broonie@...nel.org>
Cc: "Gui-Dong Han" <hanguidong02@...il.com>, <gregkh@...uxfoundation.org>,
<rafael@...nel.org>, <linux-kernel@...r.kernel.org>,
<baijiaju1990@...il.com>, "Qiu-ji Chen" <chenqiuji666@...il.com>,
<Aishwarya.TCV@....com>
Subject: Re: [PATCH v5] driver core: enforce device_lock for
driver_match_device()
On Tue Jan 20, 2026 at 2:22 PM CET, 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
Hm..sounds a bit like some match() callback manually takes the device_lock() and
the reason we're not seeing anything from lockdep is because it happens with the
serial driver.
I don't have a machine to reproduce it, but for debugging it would probably help
to not actually take the lock in __driver_attach(), but only acquire / release
the corresponding lockdep map. If my suspicion is correct, we should see a
lockdep splat pointing out the issue.
Powered by blists - more mailing lists