From nobody Tue Feb 10 00:58:23 2026 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 71D8E3203B4 for ; Wed, 21 Jan 2026 23:18:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769037487; cv=none; b=Mp+F4L5IddGVdxirPyrPco9UDeCRFY9qPi3/AKl4oJ2/MZO3KiuM25ft4x2GpEZvjpH09bT7gOUb8jfx4Mh+FSmwQ4tiOX/2Sw3ZZ+G90dg4yS3faRlOGw8GNB1ZIAgMwBDzClCgqj8t+qA19FBMRQfCOFFiDlMNH67AJGI0Wu8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769037487; c=relaxed/simple; bh=ZGveAJqQ1k88TxxI0g8RwTFg9n7mNfsWZAYPcfS1bz4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tmjpoWCh7xldHMlGOMmSBSKOd8o7hlM0ofSxwtjjSEe2b7IqO7oMhm87RYkT1lD5QzhqPoIzSWW9zrasQ9r5J4TQs0+H/DV57NBmWzI9BNNawBehtuxKPpnvF/OS/nlVfcRfFbW5nhUFc3Mr8bbviGY1krnI+fa7dNPmAX+b/Xs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=WJ6QRgiD; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="WJ6QRgiD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1769037480; bh=ZGveAJqQ1k88TxxI0g8RwTFg9n7mNfsWZAYPcfS1bz4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WJ6QRgiD8O9UXa2jilKWmox07w8XDr7bvSekiYTHeP+bt5xVeh9xcm/pqxUzf6hqx 5lsDgwfomETZtOcUEO2kQanIXWMJZTaYQgBDaJ5a+eyZH0HM9Nui6BxAxpkffsSdli LY2kv2gqzszW2zjHaKONXaRYBE6RaGW4O/eg3+HSq3WOrRBiwU8QM2qyPyl9IK0v8O avC+yXLgL3/942pQxDvZybKF0t5SjPFyZKuXgdgOC1Gwcjs08XDaJNlTq2DKJ1XrEq +aQWFsZ5BCxbkxpone/rVOPpocxETajnPzL2OeVWhkc6ZeVqo7wI8VsBtXXlE55RON 2t82DV2e1QuoQ== Received: from localhost (unknown [82.79.138.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id D3B5517E139F; Thu, 22 Jan 2026 00:17:59 +0100 (CET) From: Cristian Ciocaltea Date: Thu, 22 Jan 2026 01:17:36 +0200 Subject: [PATCH 3/6] drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260122-drm-rk-fixes-v1-3-3942f185750e@collabora.com> References: <20260122-drm-rk-fixes-v1-0-3942f185750e@collabora.com> In-Reply-To: <20260122-drm-rk-fixes-v1-0-3942f185750e@collabora.com> To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Dmitry Baryshkov , Dmitry Baryshkov Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.3 Attempting to access driver data in the platform driver ->remove() callback may lead to a null pointer dereference since there is no guaranty that the component ->bind() callback invoking platform_set_drvdata() was executed. A common scenario is when Rockchip DRM driver didn't manage to run component_bind_all() because of an (unrelated) error causing early return from rockchip_drm_bind(). Drop the unnecessary call to platform_get_drvdata() and, instead, reference the target device structure via platform_device. Fixes: d68ba7bac955 ("drm/rockchip: Add RK3588 DPTX output support") Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/ro= ckchip/dw_dp-rockchip.c index 98d97e0f3cf4..6d57e1c74627 100644 --- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c @@ -130,9 +130,7 @@ static int dw_dp_probe(struct platform_device *pdev) =20 static void dw_dp_remove(struct platform_device *pdev) { - struct rockchip_dw_dp *dp =3D platform_get_drvdata(pdev); - - component_del(dp->dev, &dw_dp_rockchip_component_ops); + component_del(&pdev->dev, &dw_dp_rockchip_component_ops); } =20 static const struct of_device_id dw_dp_of_match[] =3D { --=20 2.52.0