projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
macsec: RXSAs don't need to hold a reference on RXSCs
[cascardo/linux.git]
/
crypto
/
aead.c
diff --git
a/crypto/aead.c
b/crypto/aead.c
index
9b18a1e
..
3f5c5ff
100644
(file)
--- a/
crypto/aead.c
+++ b/
crypto/aead.c
@@
-294,9
+294,9
@@
int aead_init_geniv(struct crypto_aead *aead)
if (err)
goto out;
if (err)
goto out;
- ctx->
null = crypto_get_default_null_skcipher
();
- err = PTR_ERR(ctx->null);
- if (IS_ERR(ctx->null))
+ ctx->
sknull = crypto_get_default_null_skcipher2
();
+ err = PTR_ERR(ctx->
sk
null);
+ if (IS_ERR(ctx->
sk
null))
goto out;
child = crypto_spawn_aead(aead_instance_ctx(inst));
goto out;
child = crypto_spawn_aead(aead_instance_ctx(inst));
@@
-314,7
+314,7
@@
out:
return err;
drop_null:
return err;
drop_null:
- crypto_put_default_null_skcipher();
+ crypto_put_default_null_skcipher
2
();
goto out;
}
EXPORT_SYMBOL_GPL(aead_init_geniv);
goto out;
}
EXPORT_SYMBOL_GPL(aead_init_geniv);
@@
-324,7
+324,7
@@
void aead_exit_geniv(struct crypto_aead *tfm)
struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm);
crypto_free_aead(ctx->child);
struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm);
crypto_free_aead(ctx->child);
- crypto_put_default_null_skcipher();
+ crypto_put_default_null_skcipher
2
();
}
EXPORT_SYMBOL_GPL(aead_exit_geniv);
}
EXPORT_SYMBOL_GPL(aead_exit_geniv);
@@
-346,9
+346,13
@@
static int aead_prepare_alg(struct aead_alg *alg)
{
struct crypto_alg *base = &alg->base;
{
struct crypto_alg *base = &alg->base;
- if (max(alg->maxauthsize, alg->ivsize) > PAGE_SIZE / 8)
+ if (max3(alg->maxauthsize, alg->ivsize, alg->chunksize) >
+ PAGE_SIZE / 8)
return -EINVAL;
return -EINVAL;
+ if (!alg->chunksize)
+ alg->chunksize = base->cra_blocksize;
+
base->cra_type = &crypto_aead_type;
base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK;
base->cra_flags |= CRYPTO_ALG_TYPE_AEAD;
base->cra_type = &crypto_aead_type;
base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK;
base->cra_flags |= CRYPTO_ALG_TYPE_AEAD;