* [PATCH 10/20] drm/exynos: dpi: Fix OF node leak in exynos_dpi_parse_dt()
@ 2026-09-16 7:20 Wentao Liang
2026-11-05 8:07 ` [PATCH] drm/exynos: dpi: release the node after looking up the panel Yige Jiang
0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2026-09-16 7:20 UTC (permalink / raw)
To: airlied
Cc: alim.akhtar, dri-devel, inki.dae, krzk, kyungmin.park,
linux-arm-kernel, linux-kernel, linux-samsung-soc,
neil.armstrong, robh, seanpaul, simona, sw0312.kim, Wentao Liang,
stable
In exynos_dpi_parse_dt(), ctx->panel_node is obtained using
of_graph_get_remote_node(). However, when "display-timings" child node
is present, the driver uses display timings directly and ignores the
panel node without releasing the acquired reference count.
Call of_node_put() on ctx->panel_node and set it to NULL when
"display-timings" is present to prevent reference leaks.
Fixes: 86418f90a4c1 ("drm: convert drivers to use of_graph_get_remote_node")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 0dc36df6ada3..0b64d1031951 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -168,6 +168,8 @@ static int exynos_dpi_parse_dt(struct exynos_dpi *ctx)
int ret;
of_node_put(np);
+ of_node_put(ctx->panel_node);
+ ctx->panel_node = NULL;
vm = devm_kzalloc(dev, sizeof(*ctx->vm), GFP_KERNEL);
if (!vm)
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] drm/exynos: dpi: release the node after looking up the panel
2026-09-16 7:20 [PATCH 10/20] drm/exynos: dpi: Fix OF node leak in exynos_dpi_parse_dt() Wentao Liang
@ 2026-11-05 8:07 ` Yige Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Yige Jiang @ 2026-11-05 8:07 UTC (permalink / raw)
To: dri-devel
Cc: Yige Jiang, Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Krzysztof Kozlowski, Peter Griffin, Alim Akhtar,
linux-arm-kernel, linux-samsung-soc, linux-kernel, Wentao Liang
exynos_dpi_parse_dt() acquires the remote panel node. The posted
display-timings fix releases it on that branch, but the panel lookup
path still retains it on success and failure, including deferred
probe. of_drm_find_panel() does not consume the node reference.
Put the node immediately after the lookup and clear the unused
pointer. This covers both lookup outcomes while leaving the
separate panel reference and its existing remove-time put unchanged.
Fixes: 14b6873a0198 ("drm/exynos: restore parallel output interface support")
Link: https://patchwork.kernel.org/series/1166158/
Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
---
Based on linux-next next-20261102 (2637bdec0535).
Compile-tested: arm64, GCC 14.2.0, W=1, CONFIG_OF_DYNAMIC=y.
COMPILE_TEST=y.
Baseline and patched target objects built from this exact base.
No full kernel/module-link, hardware or runtime test was performed.
AI assistance was used for analysis and patch preparation.
This is an incremental patch based on the following posted fixes:
[PATCH 10/20] drm/exynos: dpi: Fix OF node leak in exynos_dpi_parse_dt()
<20260916072012.1967169-1-vulab@iscas.ac.cn>
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 92e8bbe9d35b..e98a9be0a705 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -243,6 +243,8 @@ struct drm_encoder *exynos_dpi_probe(struct device *dev)
if (ctx->panel_node) {
ctx->panel = of_drm_find_panel(ctx->panel_node);
+ of_node_put(ctx->panel_node);
+ ctx->panel_node = NULL;
if (IS_ERR(ctx->panel))
return ERR_CAST(ctx->panel);
}
base-commit: 2637bdec0535a2044cd830eba9a79363651d9043
prerequisite-patch-id: 8f90819fd9f71f55560dc3af57c5a0bad07bc568
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-05 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 7:20 [PATCH 10/20] drm/exynos: dpi: Fix OF node leak in exynos_dpi_parse_dt() Wentao Liang
2026-11-05 8:07 ` [PATCH] drm/exynos: dpi: release the node after looking up the panel Yige Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®