diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-02-05 00:48:24 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-02-05 00:48:53 -0500 |
commit | 7b2cd92adc5430b0c1adeb120971852b4ea1ab08 (patch) | |
tree | 217ce22454d6e1d14b4a6e77db6cf60c8e725c12 /include | |
parent | 4abfd73e34e7915e62b6f75bd3e9f4014f830910 (diff) |
crypto: api - Fix zeroing on free
Geert Uytterhoeven pointed out that we're not zeroing all the
memory when freeing a transform. This patch fixes it by calling
ksize to ensure that we zero everything in sight.
Reported-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/crypto.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 3bacd71509fb..1f2e9020acc6 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -552,7 +552,12 @@ struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, | |||
552 | const struct crypto_type *frontend, | 552 | const struct crypto_type *frontend, |
553 | u32 type, u32 mask); | 553 | u32 type, u32 mask); |
554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); | 554 | struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); |
555 | void crypto_free_tfm(struct crypto_tfm *tfm); | 555 | void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); |
556 | |||
557 | static inline void crypto_free_tfm(struct crypto_tfm *tfm) | ||
558 | { | ||
559 | return crypto_destroy_tfm(tfm, tfm); | ||
560 | } | ||
556 | 561 | ||
557 | int alg_test(const char *driver, const char *alg, u32 type, u32 mask); | 562 | int alg_test(const char *driver, const char *alg, u32 type, u32 mask); |
558 | 563 | ||