summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-24 21:52:27 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-24 21:52:27 +0100
commit40fe245cafd0b5fbecadc4de293e290224869977 (patch)
treecde7dca7d0d9364f3042bc709e8508b3cd4a4295 /crypto/algapi.c
parentcaea0bbd996a843c1a9e50a327c3c3dbd6aac534 (diff)
parent672b5907eb2a6732d88e418950fa3cb90f5c4d4a (diff)
downloadlinux-crypto-40fe245cafd0b5fbecadc4de293e290224869977.tar.gz
linux-crypto-40fe245cafd0b5fbecadc4de293e290224869977.zip
Merge branch 'x86/core' into core/percpu
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 7c41e740..56c62e28 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;