aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorOvidiu Panait2023-12-24 10:21:32 +0200
committerHerbert Xu2023-12-29 11:25:56 +0800
commitefcb50f41740ac55e6ccc4986c1a7740e21c62b4 (patch)
tree4d726fde2e913cf2049c697ee35721fe7b4abd14 /drivers/crypto
parentd1d6351e37aac14b32a291731d0855996c459d11 (diff)
crypto: sahara - fix ahash reqsize
Set the reqsize for sha algorithms to sizeof(struct sahara_sha_reqctx), the extra space is not needed. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/sahara.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 1f78dfe84c51..82c3f41ea476 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -1160,8 +1160,7 @@ static int sahara_sha_import(struct ahash_request *req, const void *in)
static int sahara_sha_cra_init(struct crypto_tfm *tfm)
{
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
- sizeof(struct sahara_sha_reqctx) +
- SHA_BUFFER_LEN + SHA256_BLOCK_SIZE);
+ sizeof(struct sahara_sha_reqctx));
return 0;
}