From: Herbert Xu <herbert@gondor.apana.org.au>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: George Cherian <gcherian@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
David Daney <david.daney@cavium.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
George Cherian <george.cherian@cavium.com>,
linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
Date: Fri, 15 Nov 2024 20:13:38 +0800 [thread overview]
Message-ID: <Zzc68q7Atu6TH4b0@gondor.apana.org.au> (raw)
In-Reply-To: <774a441420a14d4425c4b6f6d7ae0a06c795f61d.1731086525.git.christophe.jaillet@wanadoo.fr>
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@wanadoo.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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2024-11-15 12:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 17:22 Christophe JAILLET
2024-11-15 12:13 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zzc68q7Atu6TH4b0@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=david.daney@cavium.com \
--cc=gcherian@marvell.com \
--cc=george.cherian@cavium.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®