From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5877FC982ED for ; Mon, 21 Sep 2026 16:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Subject:From:To: Cc:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zhwwtpQrOe46hKZYat7vxxHUmIpsTqCiFtQ9RGstPkc=; b=DN4Tztz8gjh+Pf RPsut7eTMrFqGnlEzq1KiSheIbSZZjedwD9oW32n1Fn9tjZRFrSrEAq4ZV0N1XQAHrAh+IuZcmtJW C7GnL9/s4+x7aVoLuwhjhU+iELQT4+PzERLf8nykCHWElkN2HdGgAKl87TakP1zlvDK+g26XaENFh VSPbjTmjSUpP5Vqh0QGplEQm775SiJ58JHboMQG1hmfWCpTUeOWxBQggw0sUjxRZoChn4bKam2oga orQXs4qilKpxuRbkLFOVKQh+HddCf/lqkGf2SVLCCSlVM2ydFQj5hKiTkkpvL/CdtQnk4drMvfFHS oqQSRD/l4Pub63A9049w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8hFa-00000002tJo-46uH; Mon, 21 Sep 2026 16:52:18 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8hFN-00000002tF9-1iL5; Mon, 21 Sep 2026 16:52:06 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id C077D4E40755; Mon, 21 Sep 2026 16:52:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 8CF895FFB2; Mon, 21 Sep 2026 16:52:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C859C1032913F; Mon, 21 Sep 2026 18:51:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790009517; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=E8+TuwKUE2XBa2SuyOFw2XhfA4p/VrA5lusEOG2wO70=; b=DOj1Y41gnblEuUbAcpP3/m5HMMS+8CCXjkY0nVms96dcQJVAg6eDcUo/6D1ViLtXTvg/t6 dHQ7g26/B+Pl8hrOF9+FnEzM5qlsuFK/Qpep/KPqvJrDNIsGzH497zB30KindqOD11tjQU sVWzDA/oXW+BOeMjwphAXxrivYUOp7/mV0KOP+uqH+upCyq8Ed6J8v95Zu+EatW8JEmDya EzYiR1FyK+9ONJTnTx+Ho5A5MA+ZZdNDlSTWwXpMDgv3vhSYT2XghlFtBaVDM5Du/0Vp9s nKPzT/Qx4U8tvu2vyp1PkjsWu18hnjG7QKoc6NyrPox5y8/8QrUygXcs4LqaSw== Mime-Version: 1.0 Date: Mon, 21 Sep 2026 18:51:49 +0200 Message-Id: Cc: , , , , , , To: "Luca Ceresoli" , "Cristian Ciocaltea" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Dave Stevenson" , "Dmitry Baryshkov" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" , "Chen-Yu Tsai" , "Samuel Holland" , =?utf-8?q?Ma=C3=ADra_Canal?= , "Raspberry Pi Kernel Maintenance" , "Raphael Gallais-Pou" , "Sandy Huang" , =?utf-8?q?Heiko_St=C3=BCbner?= , "Andy Yan" , "Algea Cao" , "Daniel Stone" , "Liu Ying" , "Phong LE" , "Helge Deller" From: "Luca Ceresoli" Subject: Re: [PATCH v11 14/74] drm/bridge: Fix unlocked list access in drm_bridge_attach() X-Mailer: aerc 0.22.0 References: <20260901-dw-hdmi-qp-scramb-v11-0-bc12954a0688@collabora.com> <20260901-dw-hdmi-qp-scramb-v11-14-bc12954a0688@collabora.com> In-Reply-To: X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260921_095205_611971_60EC127D X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Mon Sep 21, 2026 at 9:23 AM CEST, Luca Ceresoli wrote: > On Tue Sep 1, 2026 at 8:50 PM CEST, Cristian Ciocaltea wrote: >> drm_bridge_attach() inspects bridge->list to warn about bridges being >> attached without a previous drm_bridge_add() call, but it does so >> without holding bridge_lock. >> >> The list head can be concurrently written by drm_bridge_add(), >> drm_bridge_remove() and __drm_bridge_free() while they operate on >> neighbouring entries of bridge_list or bridge_lingering_list, all of >> them under bridge_lock. Hence the unlocked read is a data race, even >> though it is unlikely to change the outcome of list_empty() in practice. >> >> Perform the check with bridge_lock held. >> >> Fixes: 76f1a9711b83 ("drm/bridge: add warning for bridges attached without being added") >> Signed-off-by: Cristian Ciocaltea > > Reviewed-by: Luca Ceresoli And tested with bridge hotplug: Tested-by: Luca Ceresoli -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip