[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqJkR94s107S0yiJpjNWKbi6yuqDcV7DaxbjBF-o80meaA@mail.gmail.com>
Date: Fri, 23 Apr 2021 09:55:40 -0500
From: Rob Herring <robh@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Michael Ellerman <mpe@...erman.id.au>,
Paul Mackerras <paulus@...ba.org>, gustavoars@...nel.org,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 1/2] powerpc: Fix a memory leak in error handling paths
On Fri, Apr 23, 2021 at 9:40 AM Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> If we exit the for_each_of_cpu_node loop early, the reference on the
> current node must be decremented, otherwise there is a leak.
>
> Fixes: a94fe366340a ("powerpc: use for_each_of_cpu_node iterator")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Strangely, the commit above added the needed of_node_put in one place but
> missed 2 other places!
Well, maintained it in one place and forgot to add in the other two.
> This is strange, so maybe I misunderstand something. Review carefully
> ---
> arch/powerpc/platforms/powermac/feature.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Rob Herring <robh@...nel.org>
I don't really think patch 2 is worthwhile but that's up to the
powerpc maintainers.
Rob
Powered by blists - more mailing lists