All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: [PATCH] crypto: cryptd - Remove unnecessary skcipher_request_zero
Date: Thu, 19 Jan 2023 17:01:39 +0800	[thread overview]
Message-ID: <Y8kG84TrzsjoR3Zp@gondor.apana.org.au> (raw)

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 <herbert@gondor.apana.org.au>

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,
 				   req->iv);
 
 	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,
 				   req->iv);
 
 	err = crypto_skcipher_decrypt(subreq);
-	skcipher_request_zero(subreq);
 
 	req->base.complete = rctx->complete;
 
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

                 reply	other threads:[~2023-01-19  9:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8kG84TrzsjoR3Zp@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.