* [PATCH 1/6] drm/rockchip: inno-hdmi: Switch to drmm_kzalloc()
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
@ 2026-01-21 23:17 ` Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 2/6] drm/rockchip: dw_dp: " Cristian Ciocaltea
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-21 23:17 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov
Cc: kernel, dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
Driver makes use of drmm_encoder_init() to initialize the encoder and
automatically handle the cleanup by registering drm_encoder_cleanup()
with drmm_add_action().
However, the internal structure containing the encoder part gets
allocated with devm_kzalloc(), which happens while component_bind_all()
is being called from Rockchip DRM driver. The component framework
further ensures it is deallocated as part of releasing all the resources
claimed during bind, which is triggered from component_unbind_all().
When the reference to the DRM device gets eventually dropped via
drm_dev_put() in rockchip_drm_unbind(), drmm_encoder_alloc_release()
attempts to access the now released encoder structure, leading to
use-after-free.
Ensure driver's internal structure is still reachable on encoder cleanup
by switching from a device-managed allocation to a drm-managed one.
Fixes: 969325a2597e ("drm/rockchip: inno-hdmi: Convert to drm bridge")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
index 97c20500f790..28e6fb09aae7 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
@@ -14,6 +14,7 @@
#include <drm/bridge/inno_hdmi.h>
#include <drm/drm_bridge_connector.h>
+#include <drm/drm_managed.h>
#include <drm/drm_of.h>
#include "rockchip_drm_drv.h"
@@ -90,7 +91,7 @@ static int inno_hdmi_rockchip_bind(struct device *dev, struct device *master, vo
const struct inno_hdmi_plat_data *plat_data;
int ret;
- hdmi = devm_kzalloc(dev, sizeof(*hdmi), GFP_KERNEL);
+ hdmi = drmm_kzalloc(drm, sizeof(*hdmi), GFP_KERNEL);
if (!hdmi)
return -ENOMEM;
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 2/6] drm/rockchip: dw_dp: Switch to drmm_kzalloc()
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 1/6] drm/rockchip: inno-hdmi: Switch to drmm_kzalloc() Cristian Ciocaltea
@ 2026-01-21 23:17 ` Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 3/6] drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove() Cristian Ciocaltea
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-21 23:17 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov
Cc: kernel, dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
Driver makes use of drmm_encoder_init() to initialize the encoder and
automatically handle the cleanup by registering drm_encoder_cleanup()
with drmm_add_action().
However, the internal structure containing the encoder part gets
allocated with devm_kzalloc(), which happens while component_bind_all()
is being called from Rockchip DRM driver. The component framework
further ensures it is deallocated as part of releasing all the resources
claimed during bind, which is triggered from component_unbind_all().
When the reference to the DRM device gets eventually dropped via
drm_dev_put() in rockchip_drm_unbind(), drmm_encoder_alloc_release()
attempts to access the now released encoder structure, leading to
use-after-free.
Ensure driver's internal structure is still reachable on encoder cleanup
by switching from a device-managed allocation to a drm-managed one.
Fixes: d68ba7bac955 ("drm/rockchip: Add RK3588 DPTX output support")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
index 25ab4e46301e..98d97e0f3cf4 100644
--- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
@@ -13,6 +13,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_bridge_connector.h>
+#include <drm/drm_managed.h>
#include <drm/drm_of.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
@@ -82,7 +83,7 @@ static int dw_dp_rockchip_bind(struct device *dev, struct device *master, void *
struct drm_connector *connector;
int ret;
- dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
+ dp = drmm_kzalloc(drm_dev, sizeof(*dp), GFP_KERNEL);
if (!dp)
return -ENOMEM;
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 3/6] drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove()
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 1/6] drm/rockchip: inno-hdmi: Switch to drmm_kzalloc() Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 2/6] drm/rockchip: dw_dp: " Cristian Ciocaltea
@ 2026-01-21 23:17 ` Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 4/6] drm/rockchip: dw_dp: Simplify error handling Cristian Ciocaltea
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-21 23:17 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov
Cc: kernel, dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
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 <cristian.ciocaltea@collabora.com>
---
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/rockchip/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)
static void dw_dp_remove(struct platform_device *pdev)
{
- struct rockchip_dw_dp *dp = platform_get_drvdata(pdev);
-
- component_del(dp->dev, &dw_dp_rockchip_component_ops);
+ component_del(&pdev->dev, &dw_dp_rockchip_component_ops);
}
static const struct of_device_id dw_dp_of_match[] = {
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 4/6] drm/rockchip: dw_dp: Simplify error handling
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
` (2 preceding siblings ...)
2026-01-21 23:17 ` [PATCH 3/6] drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove() Cristian Ciocaltea
@ 2026-01-21 23:17 ` Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 5/6] drm/rockchip: dw_dp: Drop unnecessary #include Cristian Ciocaltea
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-21 23:17 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov
Cc: kernel, dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
Make the code a bit more compact by getting rid of the superfluous
assignments around PTR_ERR().
While at it, also drop dev assignment in dw_dp_probe().
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
index 6d57e1c74627..785f9727b4e1 100644
--- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
@@ -101,20 +101,15 @@ static int dw_dp_rockchip_bind(struct device *dev, struct device *master, void *
drm_encoder_helper_add(encoder, &dw_dp_encoder_helper_funcs);
dp->base = dw_dp_bind(dev, encoder, &plat_data);
- if (IS_ERR(dp->base)) {
- ret = PTR_ERR(dp->base);
- return ret;
- }
+ if (IS_ERR(dp->base))
+ return PTR_ERR(dp->base);
connector = drm_bridge_connector_init(drm_dev, encoder);
- if (IS_ERR(connector)) {
- ret = PTR_ERR(connector);
- return dev_err_probe(dev, ret, "Failed to init bridge connector");
- }
+ if (IS_ERR(connector))
+ return dev_err_probe(dev, PTR_ERR(connector),
+ "Failed to init bridge connector");
- drm_connector_attach_encoder(connector, encoder);
-
- return 0;
+ return drm_connector_attach_encoder(connector, encoder);
}
static const struct component_ops dw_dp_rockchip_component_ops = {
@@ -123,9 +118,7 @@ static const struct component_ops dw_dp_rockchip_component_ops = {
static int dw_dp_probe(struct platform_device *pdev)
{
- struct device *dev = &pdev->dev;
-
- return component_add(dev, &dw_dp_rockchip_component_ops);
+ return component_add(&pdev->dev, &dw_dp_rockchip_component_ops);
}
static void dw_dp_remove(struct platform_device *pdev)
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 5/6] drm/rockchip: dw_dp: Drop unnecessary #include
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
` (3 preceding siblings ...)
2026-01-21 23:17 ` [PATCH 4/6] drm/rockchip: dw_dp: Simplify error handling Cristian Ciocaltea
@ 2026-01-21 23:17 ` Cristian Ciocaltea
2026-01-21 23:17 ` [PATCH 6/6] drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init() Cristian Ciocaltea
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-21 23:17 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov
Cc: kernel, dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
Included header "rockchip_drm_vop.h" is not directly used, drop it.
While at it, ensure #include directives are ordered alphabetically.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
index 785f9727b4e1..6abad24fa9cd 100644
--- a/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_dp-rockchip.c
@@ -7,8 +7,11 @@
*/
#include <linux/component.h>
+#include <linux/media-bus-format.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
+#include <linux/videodev2.h>
+
#include <drm/bridge/dw_dp.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_bridge.h>
@@ -19,11 +22,7 @@
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
-#include <linux/media-bus-format.h>
-#include <linux/videodev2.h>
-
#include "rockchip_drm_drv.h"
-#include "rockchip_drm_vop.h"
struct rockchip_dw_dp {
struct dw_dp *base;
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 6/6] drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init()
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
` (4 preceding siblings ...)
2026-01-21 23:17 ` [PATCH 5/6] drm/rockchip: dw_dp: Drop unnecessary #include Cristian Ciocaltea
@ 2026-01-21 23:17 ` Cristian Ciocaltea
2026-01-22 2:27 ` [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Chaoyi Chen
2026-01-22 15:21 ` Maxime Ripard
7 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-21 23:17 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov
Cc: kernel, dri-devel, linux-arm-kernel, linux-rockchip, linux-kernel
Simplify encoder initialization and cleanup by making use of
drmm_encoder_init(), which takes care of registering
drm_encoder_cleanup() with drmm_add_action().
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
index a8190a6e8978..94136d7fb1c3 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c
@@ -21,6 +21,7 @@
#include <drm/bridge/dw_hdmi_qp.h>
#include <drm/display/drm_hdmi_helper.h>
#include <drm/drm_bridge_connector.h>
+#include <drm/drm_managed.h>
#include <drm/drm_of.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
@@ -477,7 +478,7 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
if (!pdev->dev.of_node)
return -ENODEV;
- hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
+ hdmi = drmm_kzalloc(drm, sizeof(*hdmi), GFP_KERNEL);
if (!hdmi)
return -ENOMEM;
@@ -586,16 +587,16 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
return ret;
drm_encoder_helper_add(encoder, &dw_hdmi_qp_rockchip_encoder_helper_funcs);
- drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
+ ret = drmm_encoder_init(drm, encoder, NULL, DRM_MODE_ENCODER_TMDS, NULL);
+ if (ret)
+ return dev_err_probe(hdmi->dev, ret, "Failed to init encoder");
platform_set_drvdata(pdev, hdmi);
hdmi->hdmi = dw_hdmi_qp_bind(pdev, encoder, &plat_data);
- if (IS_ERR(hdmi->hdmi)) {
- drm_encoder_cleanup(encoder);
+ if (IS_ERR(hdmi->hdmi))
return dev_err_probe(hdmi->dev, PTR_ERR(hdmi->hdmi),
"Failed to bind dw-hdmi-qp");
- }
connector = drm_bridge_connector_init(drm, encoder);
if (IS_ERR(connector))
@@ -612,8 +613,6 @@ static void dw_hdmi_qp_rockchip_unbind(struct device *dev,
struct rockchip_hdmi_qp *hdmi = dev_get_drvdata(dev);
cancel_delayed_work_sync(&hdmi->hpd_work);
-
- drm_encoder_cleanup(&hdmi->encoder.encoder);
}
static const struct component_ops dw_hdmi_qp_rockchip_ops = {
--
2.52.0
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
` (5 preceding siblings ...)
2026-01-21 23:17 ` [PATCH 6/6] drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init() Cristian Ciocaltea
@ 2026-01-22 2:27 ` Chaoyi Chen
2026-01-23 23:18 ` Cristian Ciocaltea
2026-01-22 15:21 ` Maxime Ripard
7 siblings, 1 reply; 12+ messages in thread
From: Chaoyi Chen @ 2026-01-22 2:27 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov, kernel, dri-devel,
linux-arm-kernel, linux-rockchip, linux-kernel
Hi Cristian,
On 1/22/2026 7:17 AM, Cristian Ciocaltea wrote:
> The first three patches in the series are fixes for use-after-free &
> null-ptr-deref related issues found in dw_dp and inno-hdmi Rockchip DRM
> drivers.
>
Have you tried calling unbind() and bind() multiple times?
In this case, can DRM still work properly?
> The remaining ones provide a few minor improvements to dw_dp and
> dw_hdmi_qp.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> ---
> Cristian Ciocaltea (6):
> drm/rockchip: inno-hdmi: Switch to drmm_kzalloc()
> drm/rockchip: dw_dp: Switch to drmm_kzalloc()
> drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove()
> drm/rockchip: dw_dp: Simplify error handling
> drm/rockchip: dw_dp: Drop unnecessary #include
> drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init()
>
> drivers/gpu/drm/rockchip/dw_dp-rockchip.c | 35 ++++++++++----------------
> drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 13 +++++-----
> drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c | 3 ++-
> 3 files changed, 21 insertions(+), 30 deletions(-)
> ---
> base-commit: 68b271a3a94cfd6c7695a96b6398b52feb89e2c2
> change-id: 20260122-drm-rk-fixes-a7622c71553e
>
>
>
>
--
Best,
Chaoyi
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes
2026-01-22 2:27 ` [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Chaoyi Chen
@ 2026-01-23 23:18 ` Cristian Ciocaltea
2026-01-26 3:23 ` Chaoyi Chen
0 siblings, 1 reply; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-23 23:18 UTC (permalink / raw)
To: Chaoyi Chen
Cc: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov, kernel, dri-devel,
linux-arm-kernel, linux-rockchip, linux-kernel
Hi Chaoyi,
On 1/22/26 4:27 AM, Chaoyi Chen wrote:
> Hi Cristian,
>
> On 1/22/2026 7:17 AM, Cristian Ciocaltea wrote:
>> The first three patches in the series are fixes for use-after-free &
>> null-ptr-deref related issues found in dw_dp and inno-hdmi Rockchip DRM
>> drivers.
>>
>
> Have you tried calling unbind() and bind() multiple times?
> In this case, can DRM still work properly?
Do you have any specific usecase in mind?
The tests performed so far were mostly focused on reloading the rockchipdrm
module, which is how I actually noticed those issues.
Regards,
Cristian
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes
2026-01-23 23:18 ` Cristian Ciocaltea
@ 2026-01-26 3:23 ` Chaoyi Chen
0 siblings, 0 replies; 12+ messages in thread
From: Chaoyi Chen @ 2026-01-26 3:23 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
Dmitry Baryshkov, Dmitry Baryshkov, kernel, dri-devel,
linux-arm-kernel, linux-rockchip, linux-kernel
Hi Cristian,
On 1/24/2026 7:18 AM, Cristian Ciocaltea wrote:
> Do you have any specific usecase in mind?
>
> The tests performed so far were mostly focused on reloading the rockchipdrm
> module, which is how I actually noticed those issues.
Ah, if that's the case, then there's no problem. Thank you!
--
Best,
Chaoyi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes
2026-01-21 23:17 [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
` (6 preceding siblings ...)
2026-01-22 2:27 ` [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes Chaoyi Chen
@ 2026-01-22 15:21 ` Maxime Ripard
2026-01-23 23:21 ` Cristian Ciocaltea
7 siblings, 1 reply; 12+ messages in thread
From: Maxime Ripard @ 2026-01-22 15:21 UTC (permalink / raw)
To: Cristian Ciocaltea
Cc: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Dmitry Baryshkov,
Dmitry Baryshkov, kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
On Thu, Jan 22, 2026 at 01:17:33AM +0200, Cristian Ciocaltea wrote:
> The first three patches in the series are fixes for use-after-free &
> null-ptr-deref related issues found in dw_dp and inno-hdmi Rockchip DRM
> drivers.
>
> The remaining ones provide a few minor improvements to dw_dp and
> dw_hdmi_qp.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Just FYI, you'll also need to sprinkle the driver with
drm_dev_enter/exit to make this actually safe.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 0/6] Rockchip DRM use-after-free & null-ptr-deref fixes
2026-01-22 15:21 ` Maxime Ripard
@ 2026-01-23 23:21 ` Cristian Ciocaltea
0 siblings, 0 replies; 12+ messages in thread
From: Cristian Ciocaltea @ 2026-01-23 23:21 UTC (permalink / raw)
To: Maxime Ripard
Cc: Sandy Huang, Heiko Stübner, Andy Yan, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Dmitry Baryshkov,
Dmitry Baryshkov, kernel, dri-devel, linux-arm-kernel,
linux-rockchip, linux-kernel
On 1/22/26 5:21 PM, Maxime Ripard wrote:
> On Thu, Jan 22, 2026 at 01:17:33AM +0200, Cristian Ciocaltea wrote:
>> The first three patches in the series are fixes for use-after-free &
>> null-ptr-deref related issues found in dw_dp and inno-hdmi Rockchip DRM
>> drivers.
>>
>> The remaining ones provide a few minor improvements to dw_dp and
>> dw_hdmi_qp.
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
>
> Just FYI, you'll also need to sprinkle the driver with
> drm_dev_enter/exit to make this actually safe.
Thanks for the heads up!
Cristian
^ permalink raw reply [flat|nested] 12+ messages in thread