aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-02-09 08:52:02 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-09 08:52:02 -0800
commitd7c41b616518457e3bfece12e3f59f15d7450eeb (patch)
tree0c4031ec93d59176d5ce1aa4a296be5a0784f14f /include
parentFRV: in_interrupt() requires #inclusion of linux/hardirq.h not asm/hardirq.h now (diff)
parentcrypto: scatterwalk - Avoid flush_dcache_page on slab pages (diff)
downloadlinux-dev-d7c41b616518457e3bfece12e3f59f15d7450eeb.tar.xz
linux-dev-d7c41b616518457e3bfece12e3f59f15d7450eeb.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: scatterwalk - Avoid flush_dcache_page on slab pages crypto: shash - Fix tfm destruction crypto: api - Fix zeroing on free crypto: shash - Fix module refcount crypto: api - Fix algorithm test race that broke aead initialisation
Diffstat (limited to 'include')
-rw-r--r--include/crypto/hash.h2
-rw-r--r--include/linux/crypto.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index cd16d6e668ce..d797e119e3d5 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -222,7 +222,7 @@ static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm)
static inline void crypto_free_shash(struct crypto_shash *tfm)
{
- crypto_free_tfm(crypto_shash_tfm(tfm));
+ crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm));
}
static inline unsigned int crypto_shash_alignmask(
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,
const struct crypto_type *frontend,
u32 type, u32 mask);
struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask);
-void crypto_free_tfm(struct crypto_tfm *tfm);
+void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm);
+
+static inline void crypto_free_tfm(struct crypto_tfm *tfm)
+{
+ return crypto_destroy_tfm(tfm, tfm);
+}
int alg_test(const char *driver, const char *alg, u32 type, u32 mask);