2023-01-19 09:11:41

by Herbert Xu

[permalink] [raw]
Subject: [PATCH] crypto: cryptd - Remove unnecessary skcipher_request_zero

Previously the child skcipher request was stored on the stack and
therefore needed to be zeroed. As it is now dynamically allocated
we no longer need to do so.

Signed-off-by: Herbert Xu <[email protected]>

diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index ca3a40fc7da9..1ff58a021d57 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -272,7 +272,6 @@ static void cryptd_skcipher_encrypt(struct crypto_async_request *base,

err = crypto_skcipher_encrypt(subreq);
- skcipher_request_zero(subreq);

req->base.complete = rctx->complete;

@@ -300,7 +299,6 @@ static void cryptd_skcipher_decrypt(struct crypto_async_request *base,

err = crypto_skcipher_decrypt(subreq);
- skcipher_request_zero(subreq);

req->base.complete = rctx->complete;

Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt