diff mbox series

[v2,02/14] crypto: sahara - fix ahash reqsize

Message ID 20231224082144.3894863-3-ovidiu.panait@windriver.com
State Accepted
Commit efcb50f41740ac55e6ccc4986c1a7740e21c62b4
Headers show
Series crypto: sahara - bugfixes and small improvements | expand

Commit Message

Ovidiu Panait Dec. 24, 2023, 8:21 a.m. UTC
From: Ovidiu Panait <ovidiu.panait@windriver.com>

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>
---
 drivers/crypto/sahara.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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;
 }