Message ID | 1464771389-10640-8-git-send-email-t-kristo@ti.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Herbert Xu |
Headers | show |
diff --git a/crypto/ahash.c b/crypto/ahash.c index 3887a98..375bbd7 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -536,7 +536,7 @@ static int ahash_prepare_alg(struct ahash_alg *alg) struct crypto_alg *base = &alg->halg.base; if (alg->halg.digestsize > PAGE_SIZE / 8 || - alg->halg.statesize > PAGE_SIZE / 8 || + alg->halg.statesize > PAGE_SIZE * 2 || alg->halg.statesize == 0) return -EINVAL;
The statesize is used to determine the maximum size for saved ahash context. In some cases, this can be much larger than what is currently allocated for it, for example omap-sham driver uses a buffer size of PAGE_SIZE. Increase the statesize to accommodate this. Signed-off-by: Tero Kristo <t-kristo@ti.com> --- crypto/ahash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)