aboutsummaryrefslogtreecommitdiff
path: root/crypto/lrw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 18:01:17 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 18:01:17 -0700
commit6adae5d9e69743aede91b274224751811f7174f1 (patch)
tree5ad15959313fbf4b7a37a36e40b04ca718b1e423 /crypto/lrw.c
parent253f04e78ded827c30f9582489773ebe2adc8924 (diff)
parentf6259deacfd55607ae57cff422d3bc7694ea14e7 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6: [CRYPTO] padlock: Remove pointless padlock module [CRYPTO] api: Add ablkcipher_request_set_tfm [CRYPTO] cryptd: Add software async crypto daemon [CRYPTO] api: Do not remove users unless new algorithm matches [CRYPTO] cryptomgr: Fix parsing of nested templates [CRYPTO] api: Add async blkcipher type [CRYPTO] templates: Pass type/mask when creating instances [CRYPTO] tcrypt: Use async blkcipher interface [CRYPTO] api: Add async block cipher interface [CRYPTO] api: Proc functions should be marked as unused
Diffstat (limited to 'crypto/lrw.c')
-rw-r--r--crypto/lrw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c
index b4105080ac7..621095db28b 100644
--- a/crypto/lrw.c
+++ b/crypto/lrw.c
@@ -228,13 +228,18 @@ static void exit_tfm(struct crypto_tfm *tfm)
crypto_free_cipher(ctx->child);
}
-static struct crypto_instance *alloc(void *param, unsigned int len)
+static struct crypto_instance *alloc(struct rtattr **tb)
{
struct crypto_instance *inst;
struct crypto_alg *alg;
+ int err;
+
+ err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER);
+ if (err)
+ return ERR_PTR(err);
- alg = crypto_get_attr_alg(param, len, CRYPTO_ALG_TYPE_CIPHER,
- CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_ASYNC);
+ alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER,
+ CRYPTO_ALG_TYPE_MASK);
if (IS_ERR(alg))
return ERR_PTR(PTR_ERR(alg));