projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[CRYPTO] api: Add crypto_inc and crypto_xor
[powerpc.git]
/
crypto
/
cbc.c
diff --git
a/crypto/cbc.c
b/crypto/cbc.c
index
136fea7
..
1f2649e
100644
(file)
--- a/
crypto/cbc.c
+++ b/
crypto/cbc.c
@@
-275,13
+275,18
@@
static void crypto_cbc_exit_tfm(struct crypto_tfm *tfm)
crypto_free_cipher(ctx->child);
}
crypto_free_cipher(ctx->child);
}
-static struct crypto_instance *crypto_cbc_alloc(
void *param, unsigned int len
)
+static struct crypto_instance *crypto_cbc_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))
return ERR_PTR(PTR_ERR(alg));
if (IS_ERR(alg))
return ERR_PTR(PTR_ERR(alg));