[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Zzc68q7Atu6TH4b0@gondor.apana.org.au>
Date: Fri, 15 Nov 2024 20:13:38 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: George Cherian <gcherian@...vell.com>,
"David S. Miller" <davem@...emloft.net>,
David Daney <david.daney@...ium.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
George Cherian <george.cherian@...ium.com>,
linux-crypto@...r.kernel.org
Subject: Re: [PATCH] crypto: cavium - Fix an error handling path in
cpt_ucode_load_fw()
On Fri, Nov 08, 2024 at 06:22:27PM +0100, Christophe JAILLET wrote:
> If do_cpt_init() fails, a previous dma_alloc_coherent() call needs to be
> undone.
>
> Add the needed dma_free_coherent() before returning.
>
> Fixes: 9e2c7d99941d ("crypto: cavium - Add Support for Octeon-tx CPT Engine")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Compile tested only.
>
> I guess that dmam_alloc_coherent() could also be used to fix the leak.
> This would simplify cpt_unload_microcode(), IIUC.
> ---
> drivers/crypto/cavium/cpt/cptpf_main.c | 2 ++
> 1 file changed, 2 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists