diff options
Diffstat (limited to 'crypto/api.c')
-rw-r--r-- | crypto/api.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/api.c b/crypto/api.c index 5a0d6a17cfd7..67cd6f87b74a 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/kmod.h> | 20 | #include <linux/kmod.h> |
21 | #include <linux/module.h> | ||
21 | #include <linux/param.h> | 22 | #include <linux/param.h> |
22 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
23 | #include <linux/string.h> | 24 | #include <linux/string.h> |
@@ -170,6 +171,7 @@ static struct crypto_alg *crypto_alg_mod_lookup(const char *name) | |||
170 | { | 171 | { |
171 | struct crypto_alg *alg; | 172 | struct crypto_alg *alg; |
172 | struct crypto_alg *larval; | 173 | struct crypto_alg *larval; |
174 | int ok; | ||
173 | 175 | ||
174 | alg = try_then_request_module(crypto_alg_lookup(name), name); | 176 | alg = try_then_request_module(crypto_alg_lookup(name), name); |
175 | if (alg) | 177 | if (alg) |
@@ -179,7 +181,13 @@ static struct crypto_alg *crypto_alg_mod_lookup(const char *name) | |||
179 | if (!larval || !crypto_is_larval(larval)) | 181 | if (!larval || !crypto_is_larval(larval)) |
180 | return larval; | 182 | return larval; |
181 | 183 | ||
182 | if (crypto_notify(CRYPTO_MSG_ALG_REQUEST, larval) == NOTIFY_STOP) | 184 | ok = crypto_notify(CRYPTO_MSG_ALG_REQUEST, larval); |
185 | if (ok == NOTIFY_DONE) { | ||
186 | request_module("cryptomgr"); | ||
187 | ok = crypto_notify(CRYPTO_MSG_ALG_REQUEST, larval); | ||
188 | } | ||
189 | |||
190 | if (ok == NOTIFY_STOP) | ||
183 | alg = crypto_larval_wait(larval); | 191 | alg = crypto_larval_wait(larval); |
184 | else { | 192 | else { |
185 | crypto_mod_put(larval); | 193 | crypto_mod_put(larval); |