1 From 9b40f79c08e81234d759f188b233980d7e81df6c Mon Sep 17 00:00:00 2001
2 From: Wei Yongjun <weiyongjun1@huawei.com>
3 Date: Mon, 17 Oct 2016 15:10:06 +0000
4 Subject: crypto: gcm - Fix error return code in crypto_gcm_create_common()
6 From: Wei Yongjun <weiyongjun1@huawei.com>
8 commit 9b40f79c08e81234d759f188b233980d7e81df6c upstream.
10 Fix to return error code -EINVAL from the invalid alg ivsize error
11 handling case instead of 0, as done elsewhere in this function.
13 Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
14 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 Signed-off-by: Eric Biggers <ebiggers@google.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 1 file changed, 1 insertion(+), 1 deletion(-)
24 @@ -670,11 +670,11 @@ static int crypto_gcm_create_common(stru
25 ctr = crypto_skcipher_spawn_alg(&ctx->ctr);
27 /* We only support 16-byte blocks. */
29 if (ctr->cra_ablkcipher.ivsize != 16)
32 /* Not a stream cipher? */
34 if (ctr->cra_blocksize != 1)