diff options
author | Ovidiu Panait <ovidiu.panait@windriver.com> | 2023-12-24 11:21:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-26 02:27:23 +0300 |
commit | 8b355e0478103ceaf54e3df0989cd0d6939b0836 (patch) | |
tree | aaa7a27514aaf51fcc2a2be830b0f931bfa837bb /drivers/crypto | |
parent | a75ba66b69046ed0c7035fcbacd889dca630fa1c (diff) | |
download | linux-8b355e0478103ceaf54e3df0989cd0d6939b0836.tar.xz |
crypto: sahara - fix ahash reqsize
[ Upstream commit efcb50f41740ac55e6ccc4986c1a7740e21c62b4 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/sahara.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 4b32e96e197d..6e87b108df19 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -1163,8 +1163,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; } |