lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1915c7af-cd11-44ee-8de1-f613083ae8ae@foss.st.com>
Date: Tue, 18 Nov 2025 09:13:49 +0100
From: Amelie Delaunay <amelie.delaunay@...s.st.com>
To: Johan Hovold <johan@...nel.org>, Vinod Koul <vkoul@...nel.org>
CC: Ludovic Desroches <ludovic.desroches@...rochip.com>,
        Viresh Kumar
	<vireshk@...nel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>,
        Dave Jiang
	<dave.jiang@...el.com>, Vladimir Zapolskiy <vz@...ia.com>,
        Piotr Wojtaszczyk
	<piotr.wojtaszczyk@...esys.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>,
        Pierre-Yves MORDRET
	<pierre-yves.mordret@...s.st.com>
Subject: Re: [PATCH 10/15] dmaengine: stm32: dmamux: fix OF node leak on route
 allocation failure



On 11/17/25 17:12, Johan Hovold wrote:
> Make sure to drop the reference taken to the DMA master OF node also on
> late route allocation failures.
> 
> Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
> Cc: stable@...r.kernel.org      # 4.15
> Cc: Pierre-Yves MORDRET <pierre-yves.mordret@...s.st.com>
> Signed-off-by: Johan Hovold <johan@...nel.org>

Reviewed-by: Amelie Delaunay <amelie.delaunay@...s.st.com>

> ---
>   drivers/dma/stm32/stm32-dmamux.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/stm32/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c
> index 791179760782..2bd218dbabbb 100644
> --- a/drivers/dma/stm32/stm32-dmamux.c
> +++ b/drivers/dma/stm32/stm32-dmamux.c
> @@ -143,7 +143,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
>   	ret = pm_runtime_resume_and_get(&pdev->dev);
>   	if (ret < 0) {
>   		spin_unlock_irqrestore(&dmamux->lock, flags);
> -		goto error;
> +		goto err_put_dma_spec_np;
>   	}
>   	spin_unlock_irqrestore(&dmamux->lock, flags);
>   
> @@ -165,6 +165,8 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
>   
>   	return mux;
>   
> +err_put_dma_spec_np:
> +	of_node_put(dma_spec->np);
>   error:
>   	clear_bit(mux->chan_id, dmamux->dma_inuse);
>   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ