crypto: echainiv - Fix IV size in context size calculation
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 27 May 2015 06:37:34 +0000 (14:37 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 May 2015 03:23:18 +0000 (11:23 +0800)
This patch fixes a bug in the context size calculation where we
were still referring to the old cra_aead.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/echainiv.c

index 0f79fc668ad4764996b50b71afb88bf5d06a7327..62a817faec8c4d47858ea1b542ca8647ff0c42ef 100644 (file)
@@ -280,7 +280,7 @@ static int echainiv_aead_create(struct crypto_template *tmpl,
 
        inst->alg.base.cra_alignmask |= __alignof__(u32) - 1;
        inst->alg.base.cra_ctxsize = sizeof(struct echainiv_ctx);
-       inst->alg.base.cra_ctxsize += inst->alg.base.cra_aead.ivsize;
+       inst->alg.base.cra_ctxsize += inst->alg.ivsize;
 
 done:
        err = aead_register_instance(tmpl, inst);