summaryrefslogtreecommitdiffstats
path: root/crypto/api.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-09-08 14:32:24 -0700
committerDan Williams <dan.j.williams@intel.com>2009-09-08 14:32:24 -0700
commita348a7e6fdbcd2d5192a09719a479bb238fde727 (patch)
tree5ff94185f4e5a810777469d7fe7832a8ec2d3430 /crypto/api.c
parent808347f6a31792079e345ec865e9cfcb6e8ae6b2 (diff)
parent28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff)
downloadop-kernel-dev-a348a7e6fdbcd2d5192a09719a479bb238fde727.zip
op-kernel-dev-a348a7e6fdbcd2d5192a09719a479bb238fde727.tar.gz
Merge commit 'v2.6.31-rc1' into dmaengine
Diffstat (limited to 'crypto/api.c')
-rw-r--r--crypto/api.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/crypto/api.c b/crypto/api.c
index fd2545d..d5944f9 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -217,14 +217,11 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
alg = crypto_alg_lookup(name, type, mask);
if (!alg) {
- char tmp[CRYPTO_MAX_ALG_NAME];
-
- request_module(name);
+ request_module("%s", name);
if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
- CRYPTO_ALG_NEED_FALLBACK) &&
- snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
- request_module(tmp);
+ CRYPTO_ALG_NEED_FALLBACK))
+ request_module("%s-all", name);
alg = crypto_alg_lookup(name, type, mask);
}
@@ -580,20 +577,17 @@ EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm)
{
struct crypto_alg *alg;
- int size;
if (unlikely(!mem))
return;
alg = tfm->__crt_alg;
- size = ksize(mem);
if (!tfm->exit && alg->cra_exit)
alg->cra_exit(tfm);
crypto_exit_ops(tfm);
crypto_mod_put(alg);
- memset(mem, 0, size);
- kfree(mem);
+ kzfree(mem);
}
EXPORT_SYMBOL_GPL(crypto_destroy_tfm);
OpenPOWER on IntegriCloud