Commit 9c1a7747 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 219f170a 1777f1a9
...@@ -556,7 +556,7 @@ static void __exit aes_s390_fini(void) ...@@ -556,7 +556,7 @@ static void __exit aes_s390_fini(void)
module_init(aes_s390_init); module_init(aes_s390_init);
module_exit(aes_s390_fini); module_exit(aes_s390_fini);
MODULE_ALIAS("aes"); MODULE_ALIAS("aes-all");
MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm"); MODULE_DESCRIPTION("Rijndael (AES) Cipher Algorithm");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -215,8 +215,19 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) ...@@ -215,8 +215,19 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
mask &= ~(CRYPTO_ALG_LARVAL | CRYPTO_ALG_DEAD); mask &= ~(CRYPTO_ALG_LARVAL | CRYPTO_ALG_DEAD);
type &= mask; type &= mask;
alg = try_then_request_module(crypto_alg_lookup(name, type, mask), alg = crypto_alg_lookup(name, type, mask);
name); if (!alg) {
char tmp[CRYPTO_MAX_ALG_NAME];
request_module(name);
if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask) &&
snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
request_module(tmp);
alg = crypto_alg_lookup(name, type, mask);
}
if (alg) if (alg)
return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg; return crypto_is_larval(alg) ? crypto_larval_wait(alg) : alg;
......
...@@ -457,10 +457,12 @@ static int init_ixp_crypto(void) ...@@ -457,10 +457,12 @@ static int init_ixp_crypto(void)
if (!ctx_pool) { if (!ctx_pool) {
goto err; goto err;
} }
ret = qmgr_request_queue(SEND_QID, NPE_QLEN_TOTAL, 0, 0); ret = qmgr_request_queue(SEND_QID, NPE_QLEN_TOTAL, 0, 0,
"ixp_crypto:out", NULL);
if (ret) if (ret)
goto err; goto err;
ret = qmgr_request_queue(RECV_QID, NPE_QLEN, 0, 0); ret = qmgr_request_queue(RECV_QID, NPE_QLEN, 0, 0,
"ixp_crypto:in", NULL);
if (ret) { if (ret) {
qmgr_release_queue(SEND_QID); qmgr_release_queue(SEND_QID);
goto err; goto err;
......
...@@ -489,4 +489,4 @@ MODULE_DESCRIPTION("VIA PadLock AES algorithm support"); ...@@ -489,4 +489,4 @@ MODULE_DESCRIPTION("VIA PadLock AES algorithm support");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Michal Ludvig"); MODULE_AUTHOR("Michal Ludvig");
MODULE_ALIAS("aes"); MODULE_ALIAS("aes-all");
...@@ -304,7 +304,7 @@ MODULE_DESCRIPTION("VIA PadLock SHA1/SHA256 algorithms support."); ...@@ -304,7 +304,7 @@ MODULE_DESCRIPTION("VIA PadLock SHA1/SHA256 algorithms support.");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Michal Ludvig"); MODULE_AUTHOR("Michal Ludvig");
MODULE_ALIAS("sha1"); MODULE_ALIAS("sha1-all");
MODULE_ALIAS("sha256"); MODULE_ALIAS("sha256-all");
MODULE_ALIAS("sha1-padlock"); MODULE_ALIAS("sha1-padlock");
MODULE_ALIAS("sha256-padlock"); MODULE_ALIAS("sha256-padlock");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment