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 D4EB1CD6E57 for ; Tue, 2 Jun 2026 19:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HenCZbg2uScNOk5ldzqOmgfKvZAoY5QZcekhLhVnths=; b=fJFPloHLacXQ09VQFhHUJasy0s pTy0B2NRR595R+sCE84PKyMs6Gmm6Lmeaxyb9b8iUR6OmAbCjmjHHQfBdAJxPQcSV0RN/JqmZ7ksT WV1t5aM+T6rzEWRfzLjzpyx1DYmnG5fldGQdJNOqF62B64HXTZ6SQM43YFyMeldhjbEQkvZ6I5Axw kttY8V8TEKqjqyDOF+4+jvCCs4JBtGJQFu39+nexn/4PXLeV9TDsFGlCH4vUWOPTiKaLIC66mScGy rp2/NnWNpM5UUwqfREYcI3YsqOIhoavgi7cdMM4/sWZIiK47UPwU/W8I4KPghUrJS8Ic0sbxuHZbX H1BiICOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUV6h-0000000Di1q-3goH; Tue, 02 Jun 2026 19:48:59 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUV6f-0000000Di1H-3ZWm; Tue, 02 Jun 2026 19:48:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Type:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To; bh=HenCZbg2uScNOk5ldzqOmgfKvZAoY5QZcekhLhVnths=; b=XgLezGzWa4cupGlPwOHDrGp6+a anmGz58rjZwST/QbDnD6luLY6rIiojNIK4QmJzMxOhdmP9MM3GOFLiOApS0XbbN/qS93ScW9LHsZd qFoxthq9wziBXEFVHnDHyf4spCfl/Xbf7jiSq/xR6cs2aYUNBryzRI2BYr+5H9vIMoMXcLqS8LnFM u1I7t9cJUkB/U0iH3vcPnUb6Q6zZbPaGEFUepK0KB15PX030sm55TVbB2NiJx9z1YeIMf10nYM7qr fQn4zBKkKgdwr1a+Uu1eRgTeaZ4K0MwoKhUDR2QAvUWobjAHBYFz9onUD8ye01qgXQLUIXK2bBYVV cpd8ObhA==; From: Heiko Stuebner To: Sandy Huang , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Airlie , Simona Vetter , Dmitry Baryshkov , Luca Ceresoli , Sebastian Reichel Cc: Cristian Ciocaltea , Damon Ding , Dmitry Baryshkov , Alexey Charkov , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kernel@collabora.com, linux-arm-kernel@lists.infradead.org, Sebastian Reichel Subject: Re: [PATCH v2 02/12] drm/rockchip: dw_dp: Release core resources Date: Tue, 02 Jun 2026 21:48:35 +0200 Message-ID: <27595863.kmuVQn2iE0@phil> In-Reply-To: <20260501-synopsys-dw-dp-improvements-v2-2-d7e7f6bac77f@collabora.com> References: <20260501-synopsys-dw-dp-improvements-v2-0-d7e7f6bac77f@collabora.com> <20260501-synopsys-dw-dp-improvements-v2-2-d7e7f6bac77f@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260602_124857_900790_1AFE5AA6 X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Freitag, 1. Mai 2026, 00:20:29 Mitteleurop=C3=A4ische Sommerzeit schrieb= Sebastian Reichel: > From: Cristian Ciocaltea >=20 > Core resources such as the DisplayPort AUX channel get initialized and > registered during dw_dp_bind(), but are never unregistered, which may > lead to memory leaks and/or use-after-free: >=20 > [ 224.661371] BUG: KASAN: slab-use-after-free in device_is_dependent+0xe= 0/0x2b0 > [ 224.662015] Read of size 8 at addr ffff00011aee8550 by task modprobe/6= 58 > [ 224.662612] > [ 224.662752] CPU: 7 UID: 0 PID: 658 Comm: modprobe Not tainted 7.0.0-rc= 2-next-20260305 #14 PREEMPT > [ 224.662759] Hardware name: Radxa ROCK 5B (DT) > [ 224.662762] Call trace: > [ 224.662764] show_stack+0x20/0x38 (C) > [ 224.662772] dump_stack_lvl+0x6c/0x98 > [ 224.662777] print_report+0x160/0x4b8 > [ 224.662783] kasan_report+0xb4/0xe0 > [ 224.662790] __asan_report_load8_noabort+0x20/0x30 > [ 224.662796] device_is_dependent+0xe0/0x2b0 > [ 224.662802] device_is_dependent+0x108/0x2b0 > [ 224.662808] device_link_add+0x1f8/0x10b0 > [ 224.662813] devm_of_phy_get_by_index+0x120/0x200 > [ 224.662819] dw_dp_bind+0x34c/0xb10 [dw_dp] > [ 224.662830] dw_dp_rockchip_bind+0x194/0x250 [rockchipdrm] > [ 224.662864] component_bind_all+0x3a8/0x720 > [ 224.662869] rockchip_drm_bind+0x120/0x390 [rockchipdrm] > [ 224.662899] try_to_bring_up_aggregate_device+0x76c/0x838 > [ 224.662904] component_master_add_with_match+0x1f4/0x230 > [ 224.662909] rockchip_drm_platform_probe+0x420/0x538 [rockchipdrm] > [ 224.662939] platform_probe+0xe8/0x168 > [ 224.662945] really_probe+0x340/0x828 > [ 224.662950] __driver_probe_device+0x2e0/0x350 > [ 224.662954] driver_probe_device+0x80/0x140 > [ 224.662959] __driver_attach+0x398/0x460 > [ 224.662964] bus_for_each_dev+0xe0/0x198 > [ 224.662968] driver_attach+0x50/0x68 > [ 224.662972] bus_add_driver+0x2a0/0x4c0 > [ 224.662977] driver_register+0x294/0x360 > [ 224.662982] __platform_driver_register+0x7c/0x98 > [ 224.662987] rockchip_drm_init+0xc4/0xff8 [rockchipdrm] >=20 > Since a previous commit exported dw_dp_unbind() function in DW DP core > library to take care of the necessary cleanup, use this in the > component's unbind() callback, as well as in its bind() error path. >=20 > Fixes: d68ba7bac955 ("drm/rockchip: Add RK3588 DPTX output support") > Signed-off-by: Cristian Ciocaltea > Signed-off-by: Sebastian Reichel picked the same one from Cristian's series