diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-06-25 02:46:31 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2009-06-25 02:46:31 -0400 |
commit | 435578aeaad5859dda8657e3ed2c1a5bc1e524ec (patch) | |
tree | 546a3a613f4656b66d217e49a238961f7e3b2c28 /crypto | |
parent | 409a736336b560798f84d71ad6477c8fad20b523 (diff) |
crypto: skcipher - Fix request for sync algorithms
When a sync givcipher algorithm is requested, if an async version
of the same algorithm already exists, then we will loop forever
without ever constructing the sync version based on a blkcipher.
This is because we did not include the requested type/mask when
getting a larval for the geniv algorithm that is to be constructed.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ablkcipher.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index e11ce37c7104..43fc8fb9f978 100644 --- a/crypto/ablkcipher.c +++ b/crypto/ablkcipher.c | |||
@@ -201,8 +201,9 @@ static int crypto_givcipher_default(struct crypto_alg *alg, u32 type, u32 mask) | |||
201 | int err; | 201 | int err; |
202 | 202 | ||
203 | larval = crypto_larval_lookup(alg->cra_driver_name, | 203 | larval = crypto_larval_lookup(alg->cra_driver_name, |
204 | (type & ~CRYPTO_ALG_TYPE_MASK) | | ||
204 | CRYPTO_ALG_TYPE_GIVCIPHER, | 205 | CRYPTO_ALG_TYPE_GIVCIPHER, |
205 | CRYPTO_ALG_TYPE_MASK); | 206 | mask | CRYPTO_ALG_TYPE_MASK); |
206 | err = PTR_ERR(larval); | 207 | err = PTR_ERR(larval); |
207 | if (IS_ERR(larval)) | 208 | if (IS_ERR(larval)) |
208 | goto out; | 209 | goto out; |