[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3a5128e-7f1c-58e9-05fd-d467a552429f@kernel.org>
Date: Wed, 22 Jun 2022 11:00:21 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Liang He <windhl@....com>, tony@...mide.com, linux@...linux.org.uk
Cc: linux-omap@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm/mach-omap2: Fix refcount leak bug in omap_hwmod.c
On 18/06/2022 03:47, Liang He wrote:
> In _init(), of_find_node_by_name() will return a node pointer with
> refcount incremented. We should use of_node_put() in fail path or
> when it is not used anymore.
>
> NOTE: As the ref will be passed from 'bus' to 'np' by the xx_lookup(),
> in normal exit path, we should call of_node_put() at the end use of 'np',
> not the end use of 'bus'.
>
> Signed-off-by: Liang He <windhl@....com>
> ---
> arch/arm/mach-omap2/omap_hwmod.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
Before applying the patch please check it carefully. Previous evidence
[1][2] suggests that not it was not even compiled.
[1] https://lore.kernel.org/all/202206221602.odN70SHs-lkp@intel.com/
[2]
https://lore.kernel.org/all/16f9a971.44e5.1817068ee3c.Coremail.windhl@126.com/
Best regards,
Krzysztof
Powered by blists - more mailing lists