From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ethan Tidmore <ethantidmore06@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Keerthy <j-keerthy@ti.com>, Tero Kristo <t-kristo@ti.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: sa2ul: add missing IS_ERR checks
Date: Sat, 28 Feb 2026 12:40:34 +0900 [thread overview]
Message-ID: <aaJjsnV8rGLpxha_@gondor.apana.org.au> (raw)
In-Reply-To: <20260216231609.38021-1-ethantidmore06@gmail.com>
On Mon, Feb 16, 2026 at 05:16:09PM -0600, Ethan Tidmore wrote:
> The function dmaengine_desc_get_metadata_ptr() can return an error
> pointer and is not checked for it. Add error pointer checks.
>
> Fixes: 7694b6ca649fe ("crypto: sa2ul - Add crypto driver")
> Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
> ---
> drivers/crypto/sa2ul.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c
> index fdc0b2486069..58d41c269d62 100644
> --- a/drivers/crypto/sa2ul.c
> +++ b/drivers/crypto/sa2ul.c
> @@ -1051,6 +1051,9 @@ static void sa_aes_dma_in_callback(void *data)
> if (req->iv) {
> mdptr = (__be32 *)dmaengine_desc_get_metadata_ptr(rxd->tx_in, &pl,
> &ml);
> + if (IS_ERR(mdptr))
> + return;
Thanks for adding the error checks. However, if we get an error
here shouldn't we still free the resources and pass the error up
to the caller?
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
next prev parent reply other threads:[~2026-02-28 3:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 23:16 Ethan Tidmore
2026-02-28 3:40 ` Herbert Xu [this message]
2026-03-01 22:53 ` Ethan Tidmore
2026-03-02 12:27 ` Herbert Xu
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=aaJjsnV8rGLpxha_@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=davem@davemloft.net \
--cc=ethantidmore06@gmail.com \
--cc=j-keerthy@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=t-kristo@ti.com \
/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®