From: Stephan Mueller <smueller@chronox.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel()
Date: Fri, 17 Jun 2016 09:19:58 +0000 [thread overview]
Message-ID: <1774858.Ao0ox7E6zA@tauon.atsec.com> (raw)
In-Reply-To: <20160617091618.GC25609@mwanda>
Am Freitag, 17. Juni 2016, 12:16:19 schrieb Dan Carpenter:
Hi Dan,
> We accidentally return PTR_ERR(NULL) which is success but we should
> return -ENOMEM.
>
> Fixes: 355912852115 ('crypto: drbg - use CTR AES instead of ECB AES')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Stephan Mueller <smueller@chronox.de>
That points to an error in the documentation of skcipher_request_alloc.
I will send a follow-up patch.
>
> diff --git a/crypto/drbg.c b/crypto/drbg.c
> index ded8638..6872d15 100644
> --- a/crypto/drbg.c
> +++ b/crypto/drbg.c
> @@ -1686,7 +1686,7 @@ static int drbg_init_sym_kernel(struct drbg_state
> *drbg) if (!req) {
> pr_info("DRBG: could not allocate request queue\n");
> drbg_fini_sym_kernel(drbg);
> - return PTR_ERR(req);
> + return -ENOMEM;
> }
> drbg->ctr_req = req;
> skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG,
Ciao
Stephan
next prev parent reply other threads:[~2016-06-17 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 9:16 [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() Dan Carpenter
2016-06-17 9:19 ` Stephan Mueller [this message]
2016-06-17 9:23 ` Stephan Mueller
2016-06-20 11:35 ` 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=1774858.Ao0ox7E6zA@tauon.atsec.com \
--to=smueller@chronox.de \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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