summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-13 13:05:57 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-13 13:05:57 +0100
commitced91f4e1addc0ab3d00cbc36af7e4a071b3322b (patch)
tree2973da25894efebef2980db676f9cc91256b328d /crypto/algapi.c
parentcaea0bbd996a843c1a9e50a327c3c3dbd6aac534 (diff)
parentab2867eed88e7823dc312e585a65c1c86040edc4 (diff)
downloadlinux-crypto-ced91f4e1addc0ab3d00cbc36af7e4a071b3322b.tar.gz
linux-crypto-ced91f4e1addc0ab3d00cbc36af7e4a071b3322b.zip
Merge branch 'x86/core' into x86/headers
Diffstat (limited to '')
-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;