[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87jyznitzi.fsf@bootlin.com>
Date: Tue, 18 Nov 2025 10:13:21 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Johan Hovold <johan@...nel.org>, Vinod Koul <vkoul@...nel.org>,
Ludovic Desroches <ludovic.desroches@...rochip.com>, Viresh Kumar
<vireshk@...nel.org>, Vinicius Costa Gomes <vinicius.gomes@...el.com>,
Dave Jiang <dave.jiang@...el.com>, Vladimir Zapolskiy <vz@...ia.com>,
Piotr Wojtaszczyk <piotr.wojtaszczyk@...esys.com>, Amélie Delaunay
<amelie.delaunay@...s.st.com>, Maxime Coquelin
<mcoquelin.stm32@...il.com>, Alexandre Torgue
<alexandre.torgue@...s.st.com>, Peter Ujfalusi
<peter.ujfalusi@...il.com>, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 04/15] dmaengine: dw: dmamux: fix OF node leak on route
allocation failure
Hi Andy,
On 17/11/2025 at 18:05:47 +01, Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> On Mon, Nov 17, 2025 at 05:12:47PM +0100, Johan Hovold wrote:
>> Make sure to drop the reference taken to the DMA master OF node also on
>> late route allocation failures.
>
> ...
>
>> +put_dma_spec_np:
>> + of_node_put(dma_spec->np);
>
> Can we use __free() instead?
I probably haven't followed closely enough, but I don't understand how
__free() is best than of_node_put() in front of of_parse_phandle()?
Especially since the doc clearly states
"Return: The device_node pointer with refcount incremented.
Use of_node_put() on it when done."
> (Just in case you are going to question the appearance of cleanup.h and the
> respective class in of.h, it's available in the closest stable, i.e.
> v6.1.108 onwards).
I don't believe including a recent header is a good practice for stable
inclusion anyway. I would recommend to let the commit as it is and in a
follow-up patch, maybe, we can move to a newer API if we want. This way
history between stable and mailine versions is easier to compare.
Reviewed-by: Miquel Raynal <miquel.raynal@...tlin.com>
Thanks,
Miquèl
Powered by blists - more mailing lists