[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1YviM0-0000xd-D7@gondolin.me.apana.org.au>
Date: Fri, 22 May 2015 16:30:52 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Johannes Berg <johannes@...solutions.net>,
Marcel Holtmann <marcel@...tmann.org>,
Steffen Klassert <steffen.klassert@...unet.com>,
Stephan Mueller <smueller@...onox.de>
Subject: [v2 PATCH 4/13] crypto: aead - Do not set cra_type for new style instances
The function aead_geniv_alloc currently sets cra_type even for
new style instances. This is unnecessary and may hide bugs such
as when our caller uses crypto_register_instance instead of the
correct aead_register_instance.
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
---
crypto/aead.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/crypto/aead.c b/crypto/aead.c
index c1f73a9..8b26613 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -468,12 +468,10 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl,
CRYPTO_MAX_ALG_NAME)
goto err_drop_alg;
- inst->alg.base.cra_flags = CRYPTO_ALG_TYPE_AEAD;
- inst->alg.base.cra_flags |= alg->base.cra_flags & CRYPTO_ALG_ASYNC;
+ inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC;
inst->alg.base.cra_priority = alg->base.cra_priority;
inst->alg.base.cra_blocksize = alg->base.cra_blocksize;
inst->alg.base.cra_alignmask = alg->base.cra_alignmask;
- inst->alg.base.cra_type = &crypto_new_aead_type;
inst->alg.ivsize = ivsize;
inst->alg.maxauthsize = maxauthsize;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists