From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 87BB921A434; Tue, 2 Jun 2026 19:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780429736; cv=none; b=Q6rcrkAM/mzC2P52IqawydlG2UiBxOers7Uog701qtRxJ1Ja10ZecrRKfiQO0LB3dxmmLk7G3BaIaUeuLMGwFq/vKyhhg+YTkPOINwSANv/SiMlfyQFzemxfRP/DPfhXA2vJI5Mzd3CvyBm0tlHFxhy5ZJ8UZFjtmebxvwfDzpY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780429736; c=relaxed/simple; bh=eI2SY4vAWBUcVI4Itia0BmwBL3S8+RC/4OG0UhuQZT8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Vl6tOvPW1Rgj0NFhZb3MsgOdtbhjWDCoIVx5iUsac5PsHvP8e7aIw9rAIHZrxSwTKzKiL80IVLW3l187WLwEXIOsOQbFsmM4Yjg1S+hPj4pE2ijlaDCLrvZUkUZVPhdrbipt+1buF9xpBJW49l0GAZ3I+HAkWFBt2q4IydiQJWY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=XgLezGzW; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="XgLezGzW" 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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