Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aef73cfc authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: async - Use kzfree for requests



This patch changes the kfree call to kzfree for async requests.
As the request may contain sensitive data it needs to be zeroed
before it can be reallocated by others.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 57cfe44b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -186,7 +186,7 @@ static inline struct ahash_request *ahash_request_alloc(


static inline void ahash_request_free(struct ahash_request *req)
static inline void ahash_request_free(struct ahash_request *req)
{
{
	kfree(req);
	kzfree(req);
}
}


static inline struct ahash_request *ahash_request_cast(
static inline struct ahash_request *ahash_request_cast(
+2 −2
Original line number Original line Diff line number Diff line
@@ -770,7 +770,7 @@ static inline struct ablkcipher_request *ablkcipher_request_alloc(


static inline void ablkcipher_request_free(struct ablkcipher_request *req)
static inline void ablkcipher_request_free(struct ablkcipher_request *req)
{
{
	kfree(req);
	kzfree(req);
}
}


static inline void ablkcipher_request_set_callback(
static inline void ablkcipher_request_set_callback(
@@ -901,7 +901,7 @@ static inline struct aead_request *aead_request_alloc(struct crypto_aead *tfm,


static inline void aead_request_free(struct aead_request *req)
static inline void aead_request_free(struct aead_request *req)
{
{
	kfree(req);
	kzfree(req);
}
}


static inline void aead_request_set_callback(struct aead_request *req,
static inline void aead_request_set_callback(struct aead_request *req,