aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/algapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r--crypto/algapi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index f0df85fc1f50..acea250677c0 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -21,12 +21,12 @@
21 21
22static LIST_HEAD(crypto_template_list); 22static LIST_HEAD(crypto_template_list);
23 23
24void crypto_larval_error(const char *name) 24void crypto_larval_error(const char *name, u32 type, u32 mask)
25{ 25{
26 struct crypto_alg *alg; 26 struct crypto_alg *alg;
27 27
28 down_read(&crypto_alg_sem); 28 down_read(&crypto_alg_sem);
29 alg = __crypto_alg_lookup(name); 29 alg = __crypto_alg_lookup(name, type, mask);
30 up_read(&crypto_alg_sem); 30 up_read(&crypto_alg_sem);
31 31
32 if (alg) { 32 if (alg) {
@@ -87,6 +87,8 @@ static int __crypto_register_alg(struct crypto_alg *alg)
87 !strcmp(alg->cra_driver_name, q->cra_name))) { 87 !strcmp(alg->cra_driver_name, q->cra_name))) {
88 struct crypto_larval *larval = (void *)q; 88 struct crypto_larval *larval = (void *)q;
89 89
90 if ((q->cra_flags ^ alg->cra_flags) & larval->mask)
91 continue;
90 if (!crypto_mod_get(alg)) 92 if (!crypto_mod_get(alg))
91 continue; 93 continue;
92 larval->adult = alg; 94 larval->adult = alg;