From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D42D44A725 for ; Tue, 20 Jan 2026 15:23:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768922614; cv=none; b=kdl4runwu0uzoweb7fyR+D6QLU3UMppAtZONcZtIsW5GBi9D+UabiYvbT06XQf6e74ogmtVfSJpRyNYG38Ri3R2Ng8MR5aJ6pjVERz5nGrHyYmLk1HmQCRC2XITpWOz8WRikUqIRZXh5kPOaGXV0Cp1ug3PImF0m4wsVLWWaALM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768922614; c=relaxed/simple; bh=TlCEQ7pq3D400SpCDnQmgXNIups25l/KsSCPzxXc520=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=jA5xlOuqn3bG/qx0U8E4V4+FBH/xMVDGaE8k7rtYYdHwLj7Eipq1wE4I8gE6ixY8Ljxnv5xVJCjDpxZ3vu7h3vU/OBRMrxBkUDtlqR3T4bPYpP0Fnka+51Q7F3PX7fa0daUJSOmrEDmLN8NjF5DedWwZzdQUI0/n1wU7YNQC/hs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=kv2NRTLJ; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="kv2NRTLJ" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20260120152329euoutp01bd1195fc4d62bb76a3b75f3295c3665b~Meb2lEI1o2523225232euoutp01l for ; Tue, 20 Jan 2026 15:23:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20260120152329euoutp01bd1195fc4d62bb76a3b75f3295c3665b~Meb2lEI1o2523225232euoutp01l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1768922609; bh=YVNk+KnqSK5Bn5U1PC8Xg/pojQtn8wv4p8jt8KBddw8=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=kv2NRTLJACLfKxi6pcQdWRzThq0oSVCxodzvZnWEIaeIQIBDKuhsN6rJDixFf8oq8 jpsWgh6L3VZ8bEeZiwl6ih3/Zgy5QfdGDJTAycKD0hnbHeTDOyGjj8k6upl23vmMgJ 2HqKpMazrQy/fjFC2EK/GB2A0Jhn9Kcp++bwAuhQ= Received: from eusmtip1.samsung.com (unknown [203.254.199.221]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20260120152328eucas1p1024a7488ae10b8b7f2fcb74baee24c75~Meb2MTiRr1919019190eucas1p11; Tue, 20 Jan 2026 15:23:28 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20260120152327eusmtip1f9fd14a0c5e3e6938cc499a3e389bfaf~Meb1g6_vc1078610786eusmtip1c; Tue, 20 Jan 2026 15:23:27 +0000 (GMT) Message-ID: Date: Tue, 20 Jan 2026 16:23:27 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: [PATCH v5] driver core: enforce device_lock for driver_match_device() To: Mark Brown , Gui-Dong Han Cc: gregkh@linuxfoundation.org, rafael@kernel.org, dakr@kernel.org, linux-kernel@vger.kernel.org, baijiaju1990@gmail.com, Qiu-ji Chen , Aishwarya.TCV@arm.com Content-Language: en-US From: Marek Szyprowski In-Reply-To: <7ae38e31-ef31-43ad-9106-7c76ea0e8596@sirena.org.uk> Content-Transfer-Encoding: 8bit X-CMS-MailID: 20260120152328eucas1p1024a7488ae10b8b7f2fcb74baee24c75 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20260120152328eucas1p1024a7488ae10b8b7f2fcb74baee24c75 X-EPHeader: CA X-CMS-RootMailID: 20260120152328eucas1p1024a7488ae10b8b7f2fcb74baee24c75 References: <20260113162843.12712-1-hanguidong02@gmail.com> <7ae38e31-ef31-43ad-9106-7c76ea0e8596@sirena.org.uk> 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 > > with no further output, full log: > > https://lava.sirena.org.uk/scheduler/job/2387335#L862 > > We are also seeing similar looking boot hangs on some Qualcomm platforms > in Arm's test lab which aren't verified to be the same thing but are > hanging at a similar point in boot. I've observed the same issue on Qualcomm RB5 board and bisecting lead me also to this patch. My kernel log also doesn't reveal much information: ... [    3.671227] vreg_bob: Setting 3008000-4000000uV [    3.676929] vreg_l1c_1p8: Setting 1800000-1800000uV [    3.682826] vreg_l2c_1p2: Setting 1200000-1200000uV [    3.688547] vreg_l3c_0p8: Setting 800000-800000uV [    3.694080] vreg_l4c_1p7: Setting 1704000-2928000uV [    3.699908] vreg_l5c_1p8: Setting 1800000-2928000uV [    3.705763] vreg_l6c_2p96: Setting 1800000-2960000uV [    3.711684] vreg_l7c_cam_vcm0_2p85: Setting 2856000-3104000uV [    3.718408] vreg_l8c_1p8: Setting 1800000-1800000uV [    3.724287] vreg_l9c_2p96: Setting 2704000-2960000uV [    3.730218] vreg_l10c_3p0: Setting 3000000-3000000uV [    3.736226] vreg_l11c_3p3: Setting 3296000-3296000uV [    3.743413] vreg_s8c_1p3: Setting 1352000-1352000uV [    3.771370] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [    3.792020] msm_serial: driver initialized [    3.797633] SuperH (H)SCI(F) driver initialized [    3.802881] STM32 USART driver initialized [hang/freeze] Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland