diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-23 15:41:53 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-25 18:41:31 +0800 |
commit | d1ee1f02b7a207e757cbd78a9865a69234a0d867 (patch) | |
tree | 04a42be74eebef375f5fe628c9f8082146d3d5af /crypto/aead.c | |
parent | 1e419c7970f124113c443b6154f1f8a049cf6e00 (diff) | |
download | linux-stable-d1ee1f02b7a207e757cbd78a9865a69234a0d867.tar.gz linux-stable-d1ee1f02b7a207e757cbd78a9865a69234a0d867.tar.bz2 linux-stable-d1ee1f02b7a207e757cbd78a9865a69234a0d867.zip |
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@gondor.apana.org.au>
Diffstat (limited to 'crypto/aead.c')
-rw-r--r-- | crypto/aead.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/aead.c b/crypto/aead.c index a6385bd0e050..070e4b9e94f8 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; |