git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git]
/
crypto
/
ecb.c
diff --git
a/crypto/ecb.c
b/crypto/ecb.c
index
839a0ae
..
a46838e
100644
(file)
--- a/
crypto/ecb.c
+++ b/
crypto/ecb.c
@@
-115,15
+115,20
@@
static void crypto_ecb_exit_tfm(struct crypto_tfm *tfm)
crypto_free_cipher(ctx->child);
}
crypto_free_cipher(ctx->child);
}
-static struct crypto_instance *crypto_ecb_alloc(
void *param, unsigned int len
)
+static struct crypto_instance *crypto_ecb_alloc(
struct rtattr **tb
)
{
struct crypto_instance *inst;
struct crypto_alg *alg;
{
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))
if (IS_ERR(alg))
- return ERR_
PTR(PTR_ERR(alg)
);
+ return ERR_
CAST(alg
);
inst = crypto_alloc_instance("ecb", alg);
if (IS_ERR(inst))
inst = crypto_alloc_instance("ecb", alg);
if (IS_ERR(inst))