[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1774858.Ao0ox7E6zA@tauon.atsec.com>
Date: Fri, 17 Jun 2016 11:19:58 +0200
From: Stephan Mueller <smueller@...onox.de>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel()
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@...cle.com>
Acked-by: Stephan Mueller <smueller@...onox.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
Powered by blists - more mailing lists