diff options
Diffstat (limited to 'crypto/cbc.c')
-rw-r--r-- | crypto/cbc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/cbc.c b/crypto/cbc.c index 136fea7e7000..1f2649e13b42 100644 --- a/crypto/cbc.c +++ b/crypto/cbc.c | |||
@@ -275,13 +275,18 @@ static void crypto_cbc_exit_tfm(struct crypto_tfm *tfm) | |||
275 | crypto_free_cipher(ctx->child); | 275 | crypto_free_cipher(ctx->child); |
276 | } | 276 | } |
277 | 277 | ||
278 | static struct crypto_instance *crypto_cbc_alloc(void *param, unsigned int len) | 278 | static struct crypto_instance *crypto_cbc_alloc(struct rtattr **tb) |
279 | { | 279 | { |
280 | struct crypto_instance *inst; | 280 | struct crypto_instance *inst; |
281 | struct crypto_alg *alg; | 281 | struct crypto_alg *alg; |
282 | int err; | ||
283 | |||
284 | err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_BLKCIPHER); | ||
285 | if (err) | ||
286 | return ERR_PTR(err); | ||
282 | 287 | ||
283 | alg = crypto_get_attr_alg(param, len, CRYPTO_ALG_TYPE_CIPHER, | 288 | alg = crypto_get_attr_alg(tb, CRYPTO_ALG_TYPE_CIPHER, |
284 | CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_ASYNC); | 289 | CRYPTO_ALG_TYPE_MASK); |
285 | if (IS_ERR(alg)) | 290 | if (IS_ERR(alg)) |
286 | return ERR_PTR(PTR_ERR(alg)); | 291 | return ERR_PTR(PTR_ERR(alg)); |
287 | 292 | ||