The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: ti-sn65dsi86: Fix DSI host node reference leak
@ 2026-11-18 15:00 Haoxiang Li
  2026-11-18 16:42 ` Doug Anderson
  0 siblings, 1 reply; 3+ messages in thread
From: Haoxiang Li @ 2026-11-18 15:00 UTC (permalink / raw)
  To: dianders, andrzej.hajda, neil.armstrong, rfoss, Laurent.pinchart,
	jonas, jernej.skrabec, luca.ceresoli, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, sam
  Cc: dri-devel, linux-kernel, Haoxiang Li

ti_sn_bridge_parse_dsi_host() acquires a reference to the remote DSI
host node with of_graph_get_remote_node(). If ti_sn_attach_host()
fails, the probe error path removes the bridge but does not release
this reference.

Call of_node_put() after removing the bridge in the probe error path.

Fixes: c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe")
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
---
 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 48b83df9aed6..f4cf3b4af876 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1465,6 +1465,7 @@ static int ti_sn_bridge_probe(struct auxiliary_device *adev,
 
 err_remove_bridge:
 	drm_bridge_remove(&pdata->bridge);
+	of_node_put(pdata->host_node);
 	return ret;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/bridge: ti-sn65dsi86: Fix DSI host node reference leak
  2026-11-18 15:00 [PATCH] drm/bridge: ti-sn65dsi86: Fix DSI host node reference leak Haoxiang Li
@ 2026-11-18 16:42 ` Doug Anderson
  2026-11-18 17:23   ` Luca Ceresoli
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Anderson @ 2026-11-18 16:42 UTC (permalink / raw)
  To: Haoxiang Li
  Cc: andrzej.hajda, neil.armstrong, rfoss, Laurent.pinchart, jonas,
	jernej.skrabec, luca.ceresoli, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, sam, dri-devel, linux-kernel

Hi,

On Wed, Nov 18, 2026 at 7:01 AM Haoxiang Li <haoxiang_li2024@163.com> wrote:
>
> ti_sn_bridge_parse_dsi_host() acquires a reference to the remote DSI
> host node with of_graph_get_remote_node(). If ti_sn_attach_host()
> fails, the probe error path removes the bridge but does not release
> this reference.
>
> Call of_node_put() after removing the bridge in the probe error path.
>
> Fixes: c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe")
> Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
> ---
>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

I'll probably let this sit for a bit and then merge it in a week or
two. It doesn't seem urgent, so I'd plan to land it in drm-misc-next
instead of -fixes. If anyone else feels like landing it sooner, feel
free.


-Doug

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/bridge: ti-sn65dsi86: Fix DSI host node reference leak
  2026-11-18 16:42 ` Doug Anderson
@ 2026-11-18 17:23   ` Luca Ceresoli
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Ceresoli @ 2026-11-18 17:23 UTC (permalink / raw)
  To: Doug Anderson, Haoxiang Li
  Cc: andrzej.hajda, neil.armstrong, rfoss, Laurent.pinchart, jonas,
	jernej.skrabec, luca.ceresoli, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, sam, dri-devel, linux-kernel

On Wed Nov 18, 2026 at 5:42 PM CET, Doug Anderson wrote:
> Hi,
>
> On Wed, Nov 18, 2026 at 7:01 AM Haoxiang Li <haoxiang_li2024@163.com> wrote:
>>
>> ti_sn_bridge_parse_dsi_host() acquires a reference to the remote DSI
>> host node with of_graph_get_remote_node(). If ti_sn_attach_host()
>> fails, the probe error path removes the bridge but does not release
>> this reference.
>>
>> Call of_node_put() after removing the bridge in the probe error path.
>>
>> Fixes: c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe")
>> Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
>> ---
>>  drivers/gpu/drm/bridge/ti-sn65dsi86.c | 1 +
>>  1 file changed, 1 insertion(+)
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

> I'll probably let this sit for a bit and then merge it in a week or
> two. It doesn't seem urgent, so I'd plan to land it in drm-misc-next
> instead of -fixes. If anyone else feels like landing it sooner, feel
> free.

Agreed.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-18 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 15:00 [PATCH] drm/bridge: ti-sn65dsi86: Fix DSI host node reference leak Haoxiang Li
2026-11-18 16:42 ` Doug Anderson
2026-11-18 17:23   ` Luca Ceresoli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox