Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424841 > unrolled thread
| Started by | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| First post | 2016-06-17 11:20 +0200 |
| Last post | 2016-06-20 14:10 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() Dan Carpenter <dan.carpenter@oracle.com> - 2016-06-17 11:20 +0200
Re: [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() Stephan Mueller <smueller@chronox.de> - 2016-06-17 11:30 +0200
Re: [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() Stephan Mueller <smueller@chronox.de> - 2016-06-17 11:30 +0200
Re: [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() Herbert Xu <herbert@gondor.apana.org.au> - 2016-06-20 14:10 +0200
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2016-06-17 11:20 +0200 |
| Subject | [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() |
| Message-ID | <rKY6t-4F5-13@gated-at.bofh.it> |
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>
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,
[toc] | [next] | [standalone]
| From | Stephan Mueller <smueller@chronox.de> |
|---|---|
| Date | 2016-06-17 11:30 +0200 |
| Message-ID | <rKYg9-4In-9@gated-at.bofh.it> |
| In reply to | #1424841 |
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
[toc] | [prev] | [next] | [standalone]
| From | Stephan Mueller <smueller@chronox.de> |
|---|---|
| Date | 2016-06-17 11:30 +0200 |
| Message-ID | <rKYg9-4In-11@gated-at.bofh.it> |
| In reply to | #1424845 |
Am Freitag, 17. Juni 2016, 11:19:58 schrieb Stephan Mueller:
Hi Stephan,
> 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.
Apologies, that documentation issue has already been fixed in the
cryptodev-2.6 tree. I was looking at the vanilla 4.6 tree for the
documentation while I was preparing my patch.
Ciao
Stephan
[toc] | [prev] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2016-06-20 14:10 +0200 |
| Subject | Re: [patch] crypto: drbg - fix an error code in drbg_init_sym_kernel() |
| Message-ID | <rM6bF-83j-93@gated-at.bofh.it> |
| In reply to | #1424841 |
On Fri, Jun 17, 2016 at 12:16:19PM +0300, Dan Carpenter wrote:
> 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>
Patch applied. 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web