aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/hash.c')
-rw-r--r--crypto/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/hash.c b/crypto/hash.c
index f9400a014e74..0d7caa9ab748 100644
--- a/crypto/hash.c
+++ b/crypto/hash.c
@@ -152,7 +152,7 @@ static int crypto_init_hash_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
152{ 152{
153 struct hash_alg *alg = &tfm->__crt_alg->cra_hash; 153 struct hash_alg *alg = &tfm->__crt_alg->cra_hash;
154 154
155 if (alg->digestsize > crypto_tfm_alg_blocksize(tfm)) 155 if (alg->digestsize > PAGE_SIZE / 8)
156 return -EINVAL; 156 return -EINVAL;
157 157
158 if ((mask & CRYPTO_ALG_TYPE_HASH_MASK) != CRYPTO_ALG_TYPE_HASH_MASK) 158 if ((mask & CRYPTO_ALG_TYPE_HASH_MASK) != CRYPTO_ALG_TYPE_HASH_MASK)