aboutsummaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-13 09:34:07 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-13 09:34:07 +0100
commite9c4ffb11f0b19005b5b9dc8481687a3637e5887 (patch)
tree7007f2ff846b9b057c5cd7c25e8b82e49f9b4b63 /crypto/algapi.c
parent4bcf349a0f90d1e69eb35c6df0fa285c886c1cd6 (diff)
parent071a0bc2ceace31266836801510879407a3701fa (diff)
Merge branch 'linus' into perfcounters/core
Conflicts: arch/x86/kernel/acpi/boot.c
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r--crypto/algapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 7c41e7405c4..56c62e2858d 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -149,6 +149,9 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
if (q == alg)
goto err;
+ if (crypto_is_moribund(q))
+ continue;
+
if (crypto_is_larval(q)) {
if (!strcmp(alg->cra_driver_name, q->cra_driver_name))
goto err;
@@ -197,7 +200,7 @@ void crypto_alg_tested(const char *name, int err)
down_write(&crypto_alg_sem);
list_for_each_entry(q, &crypto_alg_list, cra_list) {
- if (!crypto_is_larval(q))
+ if (crypto_is_moribund(q) || !crypto_is_larval(q))
continue;
test = (struct crypto_larval *)q;
@@ -210,6 +213,7 @@ void crypto_alg_tested(const char *name, int err)
goto unlock;
found:
+ q->cra_flags |= CRYPTO_ALG_DEAD;
alg = test->adult;
if (err || list_empty(&alg->cra_list))
goto complete;