diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-03 20:05:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-03 20:05:08 -0500 |
commit | 9c1a7747059a65dbc2d7703978841a37db699fbf (patch) | |
tree | 7bbbad1430fa70bcf1c4daaba7dd1dc88306c3b8 | |
parent | 219f170a85fee524fa528ef75a0432b79af95d0b (diff) | |
parent | 1777f1a978153e8b887c1e1eb5160ac46098b142 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: ixp4xx - Fix qmgr_request_queue build failure
crypto: api - Fix module load deadlock with fallback algorithms
-rw-r--r-- | arch/s390/crypto/aes_s390.c | 2 | ||||
-rw-r--r-- | crypto/api.c | 15 | ||||
-rw-r--r-- | drivers/crypto/ixp4xx_crypto.c | 6 | ||||
-rw-r--r-- | drivers/crypto/padlock-aes.c | 2 | ||||
-rw-r--r-- | drivers/crypto/padlock-sha.c | 4 |
5 files changed, 21 insertions, 8 deletions
diff --git a/arch/s390/crypto/aes_s390.c b/arch/s390/crypto/aes_s390.c index c42cd898f68b..6118890c946d 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c | |||
@@ -556,7 +556,7 @@ static void __exit aes_s390_fini(void) | |||
556 | module_init(aes_s390_init); | 556 | module_init(aes_s390_init); |
557 | module_exit(aes_s390_fini); | 557 | module_exit(aes_s390_fini); |
558 | 558 | ||
559 | MODULE_ALIAS("aes"); | 559 | MODULE_ALIAS("aes-all"); |
560 | 560 | ||
561 | MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); | 561 | MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); |
562 | MODULE_LICENSE("GPL"); | 562 | MODULE_LICENSE("GPL"); |
diff --git a/crypto/api.c b/crypto/api.c index efe77df6863f..38a2bc02a98c 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -215,8 +215,19 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) | |||
215 | mask &= ~(CRYPTO_ALG_LARVAL | CRYPTO_ALG_DEAD); | 215 | mask &= ~(CRYPTO_ALG_LARVAL | CRYPTO_ALG_DEAD); |
216 | type &= mask; | 216 | type &= mask; |
217 | 217 | ||
218 | alg = try_then_request_module(crypto_alg_lookup(name, type, mask), | 218 | alg = crypto_alg_lookup(name, type, mask); |
219 | name); | 219 | if (!alg) { |
220 | char tmp[CRYPTO_MAX_ALG_NAME]; | ||
221 | |||
222 | request_module(name); | ||
223 | |||
224 | if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask) && | ||
225 | snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp)) | ||
226 | request_module(tmp); | ||
227 | |||
228 | alg = crypto_alg_lookup(name, type, mask); | ||
229 | } | ||
230 | |||
220 | if (alg) | 231 | if (alg) |
221 | return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg; | 232 | return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg; |
222 | 233 | ||
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 2d637e0fbc03..d9e751be8c5f 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c | |||
@@ -457,10 +457,12 @@ static int init_ixp_crypto(void) | |||
457 | if (!ctx_pool) { | 457 | if (!ctx_pool) { |
458 | goto err; | 458 | goto err; |
459 | } | 459 | } |
460 | ret = qmgr_request_queue(SEND_QID, NPE_QLEN_TOTAL, 0, 0); | 460 | ret = qmgr_request_queue(SEND_QID, NPE_QLEN_TOTAL, 0, 0, |
461 | "ixp_crypto:out", NULL); | ||
461 | if (ret) | 462 | if (ret) |
462 | goto err; | 463 | goto err; |
463 | ret = qmgr_request_queue(RECV_QID, NPE_QLEN, 0, 0); | 464 | ret = qmgr_request_queue(RECV_QID, NPE_QLEN, 0, 0, |
465 | "ixp_crypto:in", NULL); | ||
464 | if (ret) { | 466 | if (ret) { |
465 | qmgr_release_queue(SEND_QID); | 467 | qmgr_release_queue(SEND_QID); |
466 | goto err; | 468 | goto err; |
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index 856b3cc25583..3f0fdd18255d 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c | |||
@@ -489,4 +489,4 @@ MODULE_DESCRIPTION("VIA PadLock AES algorithm support"); | |||
489 | MODULE_LICENSE("GPL"); | 489 | MODULE_LICENSE("GPL"); |
490 | MODULE_AUTHOR("Michal Ludvig"); | 490 | MODULE_AUTHOR("Michal Ludvig"); |
491 | 491 | ||
492 | MODULE_ALIAS("aes"); | 492 | MODULE_ALIAS("aes-all"); |
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index a7fbadebf623..a2c8e8514b63 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c | |||
@@ -304,7 +304,7 @@ MODULE_DESCRIPTION("VIA PadLock SHA1/SHA256 algorithms support."); | |||
304 | MODULE_LICENSE("GPL"); | 304 | MODULE_LICENSE("GPL"); |
305 | MODULE_AUTHOR("Michal Ludvig"); | 305 | MODULE_AUTHOR("Michal Ludvig"); |
306 | 306 | ||
307 | MODULE_ALIAS("sha1"); | 307 | MODULE_ALIAS("sha1-all"); |
308 | MODULE_ALIAS("sha256"); | 308 | MODULE_ALIAS("sha256-all"); |
309 | MODULE_ALIAS("sha1-padlock"); | 309 | MODULE_ALIAS("sha1-padlock"); |
310 | MODULE_ALIAS("sha256-padlock"); | 310 | MODULE_ALIAS("sha256-padlock"); |