public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ethan Tidmore" <ethantidmore06@gmail.com>
To: "Herbert Xu" <herbert@gondor.apana.org.au>,
	"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: Sun, 01 Mar 2026 16:53:50 -0600	[thread overview]
Message-ID: <DGRTCXXMP7OJ.ZETCDPV2WZN4@gmail.com> (raw)
In-Reply-To: <aaJjsnV8rGLpxha_@gondor.apana.org.au>

On Fri Feb 27, 2026 at 9:40 PM CST, Herbert Xu wrote:
> 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,

Since this is a callback I'm not sure how to propagate the error. Nor am
I aware of the specific teardown required for this driver. I'll just
drop this patch for now, hopefully I was able to draw your attention to
this possible issue

Thanks,

ET


  reply	other threads:[~2026-03-01 22:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 23:16 [PATCH] crypto: sa2ul: add missing IS_ERR checks Ethan Tidmore
2026-02-28  3:40 ` Herbert Xu
2026-03-01 22:53   ` Ethan Tidmore [this message]
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=DGRTCXXMP7OJ.ZETCDPV2WZN4@gmail.com \
    --to=ethantidmore06@gmail.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --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