linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare
@ 2024-08-26  5:49 Krzysztof Kozlowski
  2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-26  5:49 UTC (permalink / raw)
  To: Linus Walleij, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Russell King, linux-arm-kernel, linux-kernel
  Cc: Krzysztof Kozlowski

Machine code is leaking OF node reference from of_find_matching_node()
in realview_smp_prepare_cpus().

Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Not Cc-ing stable as this should have almost no impact, except code
correctness.
---
 arch/arm/mach-versatile/platsmp-realview.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-versatile/platsmp-realview.c b/arch/arm/mach-versatile/platsmp-realview.c
index 6965a1de727b..d38b2e174257 100644
--- a/arch/arm/mach-versatile/platsmp-realview.c
+++ b/arch/arm/mach-versatile/platsmp-realview.c
@@ -70,6 +70,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
 		return;
 	}
 	map = syscon_node_to_regmap(np);
+	of_node_put(np);
 	if (IS_ERR(map)) {
 		pr_err("PLATSMP: No syscon regmap\n");
 		return;
-- 
2.43.0



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

* [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe()
  2024-08-26  5:49 [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Krzysztof Kozlowski
@ 2024-08-26  5:49 ` Krzysztof Kozlowski
  2024-08-29 12:34   ` Liviu Dudau
  2024-08-29 12:33 ` [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Liviu Dudau
  2024-09-02  8:19 ` Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-26  5:49 UTC (permalink / raw)
  To: Linus Walleij, Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi,
	Russell King, linux-arm-kernel, linux-kernel
  Cc: Krzysztof Kozlowski, stable

Driver code is leaking OF node reference from of_find_matching_node() in
probe().

Fixes: ccea5e8a5918 ("bus: Add driver for Integrator/AP logic modules")
Cc: <stable@vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/bus/arm-integrator-lm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/arm-integrator-lm.c b/drivers/bus/arm-integrator-lm.c
index b715c8ab36e8..a65c79b08804 100644
--- a/drivers/bus/arm-integrator-lm.c
+++ b/drivers/bus/arm-integrator-lm.c
@@ -85,6 +85,7 @@ static int integrator_ap_lm_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 	map = syscon_node_to_regmap(syscon);
+	of_node_put(syscon);
 	if (IS_ERR(map)) {
 		dev_err(dev,
 			"could not find Integrator/AP system controller\n");
-- 
2.43.0



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

* Re: [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare
  2024-08-26  5:49 [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Krzysztof Kozlowski
  2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
@ 2024-08-29 12:33 ` Liviu Dudau
  2024-08-29 16:23   ` Sudeep Holla
  2024-09-02  8:19 ` Linus Walleij
  2 siblings, 1 reply; 6+ messages in thread
From: Liviu Dudau @ 2024-08-29 12:33 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	linux-arm-kernel, linux-kernel

On Mon, Aug 26, 2024 at 07:49:33AM +0200, Krzysztof Kozlowski wrote:
> Machine code is leaking OF node reference from of_find_matching_node()
> in realview_smp_prepare_cpus().
> 
> Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

I think Sudeep is going to take the series through his tree, but he might
be on holiday at this time.

Best regards,
Liviu

> 
> ---
> 
> Not Cc-ing stable as this should have almost no impact, except code
> correctness.
> ---
>  arch/arm/mach-versatile/platsmp-realview.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-versatile/platsmp-realview.c b/arch/arm/mach-versatile/platsmp-realview.c
> index 6965a1de727b..d38b2e174257 100644
> --- a/arch/arm/mach-versatile/platsmp-realview.c
> +++ b/arch/arm/mach-versatile/platsmp-realview.c
> @@ -70,6 +70,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
>  		return;
>  	}
>  	map = syscon_node_to_regmap(np);
> +	of_node_put(np);
>  	if (IS_ERR(map)) {
>  		pr_err("PLATSMP: No syscon regmap\n");
>  		return;
> -- 
> 2.43.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


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

* Re: [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe()
  2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
@ 2024-08-29 12:34   ` Liviu Dudau
  0 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2024-08-29 12:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	linux-arm-kernel, linux-kernel, stable

On Mon, Aug 26, 2024 at 07:49:34AM +0200, Krzysztof Kozlowski wrote:
> Driver code is leaking OF node reference from of_find_matching_node() in
> probe().
> 
> Fixes: ccea5e8a5918 ("bus: Add driver for Integrator/AP logic modules")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  drivers/bus/arm-integrator-lm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/arm-integrator-lm.c b/drivers/bus/arm-integrator-lm.c
> index b715c8ab36e8..a65c79b08804 100644
> --- a/drivers/bus/arm-integrator-lm.c
> +++ b/drivers/bus/arm-integrator-lm.c
> @@ -85,6 +85,7 @@ static int integrator_ap_lm_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
>  	map = syscon_node_to_regmap(syscon);
> +	of_node_put(syscon);
>  	if (IS_ERR(map)) {
>  		dev_err(dev,
>  			"could not find Integrator/AP system controller\n");
> -- 
> 2.43.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯


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

* Re: [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare
  2024-08-29 12:33 ` [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Liviu Dudau
@ 2024-08-29 16:23   ` Sudeep Holla
  0 siblings, 0 replies; 6+ messages in thread
From: Sudeep Holla @ 2024-08-29 16:23 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Krzysztof Kozlowski, Linus Walleij, Sudeep Holla,
	Lorenzo Pieralisi, Russell King, linux-arm-kernel, linux-kernel

On Thu, Aug 29, 2024 at 01:33:45PM +0100, Liviu Dudau wrote:
> On Mon, Aug 26, 2024 at 07:49:33AM +0200, Krzysztof Kozlowski wrote:
> > Machine code is leaking OF node reference from of_find_matching_node()
> > in realview_smp_prepare_cpus().
> > 
> > Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method")
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
> 
> I think Sudeep is going to take the series through his tree, but he might
> be on holiday at this time.
> 

I am not that lucky 😉. Anyways I left these to Linus W as he deals with
versatile platforms. I have only seen them but never run anything on them.

--
Regards,
Sudeep


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

* Re: [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare
  2024-08-26  5:49 [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Krzysztof Kozlowski
  2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
  2024-08-29 12:33 ` [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Liviu Dudau
@ 2024-09-02  8:19 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2024-09-02  8:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	linux-arm-kernel, linux-kernel

On Mon, Aug 26, 2024 at 7:49 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> Machine code is leaking OF node reference from of_find_matching_node()
> in realview_smp_prepare_cpus().
>
> Fixes: 5420b4b15617 ("ARM: realview: add an DT SMP boot method")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Collected these two on a branch, I'll try to get a pull request out
ASAP!

Yours,
Linus Walleij


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

end of thread, other threads:[~2024-09-02  8:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26  5:49 [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Krzysztof Kozlowski
2024-08-26  5:49 ` [PATCH 2/2] bus: integrator-lm: fix OF node leak in probe() Krzysztof Kozlowski
2024-08-29 12:34   ` Liviu Dudau
2024-08-29 12:33 ` [PATCH 1/2] ARM: versatile: fix OF node leak in CPUs prepare Liviu Dudau
2024-08-29 16:23   ` Sudeep Holla
2024-09-02  8:19 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).