From: Herbert Xu <herbert@gondor.apana.org.au>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [bug report] crypto: algboss - Pass instance creation error up
Date: Wed, 11 Sep 2024 16:12:51 +0800 [thread overview]
Message-ID: <ZuFRA7c_stkYI5Rr@gondor.apana.org.au> (raw)
In-Reply-To: <7f5c4907-ac4f-4b41-90d0-e00c1e552bf6@stanley.mountain>
On Wed, Sep 11, 2024 at 11:08:01AM +0300, Dan Carpenter wrote:
> Hello Herbert Xu,
>
> Commit 795f85fca229 ("crypto: algboss - Pass instance creation error
> up") from Sep 1, 2024 (linux-next), leads to the following Smatch
> static checker warning:
>
> crypto/algboss.c:67 cryptomgr_probe()
> warn: passing zero to 'ERR_PTR'
>
> crypto/algboss.c
> 50 static int cryptomgr_probe(void *data)
> 51 {
> 52 struct cryptomgr_param *param = data;
> 53 struct crypto_template *tmpl;
> 54 int err = -ENOENT;
> 55
> 56 tmpl = crypto_lookup_template(param->template);
> 57 if (!tmpl)
> 58 goto out;
> 59
> 60 do {
> 61 err = tmpl->create(tmpl, param->tb);
> 62 } while (err == -EAGAIN && !signal_pending(current));
> 63
> 64 crypto_tmpl_put(tmpl);
> 65
> 66 out:
> --> 67 param->larval->adult = ERR_PTR(err);
This is intentional. If adult is NULL then the caller will retry
the lookup in crypto_larval_wait.
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-09-11 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-11 8:08 [bug report] crypto: algboss - Pass instance creation error up Dan Carpenter
2024-09-11 8:12 ` 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=ZuFRA7c_stkYI5Rr@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=dan.carpenter@linaro.org \
--cc=linux-crypto@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