* [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc()
@ 2026-01-21 14:17 Felix Gu
2026-01-22 8:51 ` Peng Fan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Felix Gu @ 2026-01-21 14:17 UTC (permalink / raw)
To: Ulf Hansson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Dong Aisheng
Cc: linux-pm, imx, linux-arm-kernel, linux-kernel, Felix Gu
When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In imx_sc_pd_get_console_rsrc(), it does not release the reference.
Fixes: 893cfb99734f ("firmware: imx: scu-pd: do not power off console domain")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/pmdomain/imx/scu-pd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pmdomain/imx/scu-pd.c b/drivers/pmdomain/imx/scu-pd.c
index 01d465d88f60..3ec33667a308 100644
--- a/drivers/pmdomain/imx/scu-pd.c
+++ b/drivers/pmdomain/imx/scu-pd.c
@@ -326,6 +326,7 @@ static void imx_sc_pd_get_console_rsrc(void)
return;
imx_con_rsrc = specs.args[0];
+ of_node_put(specs.np);
}
static int imx_sc_get_pd_power(struct device *dev, u32 rsrc)
---
base-commit: 053966c344dbd346e71305f530e91ea77916189f
change-id: 20260121-b4-scu-pd-257a9a40e84e
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc()
2026-01-21 14:17 [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc() Felix Gu
@ 2026-01-22 8:51 ` Peng Fan
2026-01-22 15:01 ` Markus Elfring
2026-01-27 14:27 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Peng Fan @ 2026-01-22 8:51 UTC (permalink / raw)
To: Felix Gu
Cc: Ulf Hansson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Dong Aisheng, linux-pm, imx, linux-arm-kernel,
linux-kernel
On Wed, Jan 21, 2026 at 10:17:17PM +0800, Felix Gu wrote:
>When calling of_parse_phandle_with_args(), the caller is responsible
>to call of_node_put() to release the reference of device node.
>In imx_sc_pd_get_console_rsrc(), it does not release the reference.
>
>Fixes: 893cfb99734f ("firmware: imx: scu-pd: do not power off console domain")
>Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc()
2026-01-21 14:17 [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc() Felix Gu
2026-01-22 8:51 ` Peng Fan
@ 2026-01-22 15:01 ` Markus Elfring
2026-01-27 14:27 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2026-01-22 15:01 UTC (permalink / raw)
To: Felix Gu, imx, kernel, linux-arm-kernel, linux-pm
Cc: LKML, Dong Aisheng, Fabio Estevam, Peng Fan, Sascha Hauer,
Shawn Guo, Ulf Hansson
…
> In imx_sc_pd_get_console_rsrc(), it does not release the reference.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc6#n94
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc()
2026-01-21 14:17 [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc() Felix Gu
2026-01-22 8:51 ` Peng Fan
2026-01-22 15:01 ` Markus Elfring
@ 2026-01-27 14:27 ` Ulf Hansson
2 siblings, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2026-01-27 14:27 UTC (permalink / raw)
To: Felix Gu
Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Dong Aisheng, linux-pm, imx, linux-arm-kernel, linux-kernel
On Wed, 21 Jan 2026 at 15:17, Felix Gu <ustc.gu@gmail.com> wrote:
>
> When calling of_parse_phandle_with_args(), the caller is responsible
> to call of_node_put() to release the reference of device node.
> In imx_sc_pd_get_console_rsrc(), it does not release the reference.
>
> Fixes: 893cfb99734f ("firmware: imx: scu-pd: do not power off console domain")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Applied for next by amending the commit-msg-header, thanks!
Kind regards
Uffe
> ---
> drivers/pmdomain/imx/scu-pd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pmdomain/imx/scu-pd.c b/drivers/pmdomain/imx/scu-pd.c
> index 01d465d88f60..3ec33667a308 100644
> --- a/drivers/pmdomain/imx/scu-pd.c
> +++ b/drivers/pmdomain/imx/scu-pd.c
> @@ -326,6 +326,7 @@ static void imx_sc_pd_get_console_rsrc(void)
> return;
>
> imx_con_rsrc = specs.args[0];
> + of_node_put(specs.np);
> }
>
> static int imx_sc_get_pd_power(struct device *dev, u32 rsrc)
>
> ---
> base-commit: 053966c344dbd346e71305f530e91ea77916189f
> change-id: 20260121-b4-scu-pd-257a9a40e84e
>
> Best regards,
> --
> Felix Gu <ustc.gu@gmail.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-27 14:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 14:17 [PATCH] firmware: imx: scu-pd: Fix device_node reference leak in imx_sc_pd_get_console_rsrc() Felix Gu
2026-01-22 8:51 ` Peng Fan
2026-01-22 15:01 ` Markus Elfring
2026-01-27 14:27 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox