diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-02-25 16:40:10 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-02-25 16:40:10 +0100 |
| commit | 2e31add2a7e2a15d07f592c21ba35870fa9a1d1f (patch) | |
| tree | 814e2c70fb5528f108114c0da6e5a1e219e6a0e1 /crypto/algapi.c | |
| parent | d639bab8da86d330493487e8c0fea8ca31f53427 (diff) | |
| parent | 17581ad812a9abb0182260374ef2e52d4a808a64 (diff) | |
Merge branch 'x86/urgent' into x86/pat
Diffstat (limited to 'crypto/algapi.c')
| -rw-r--r-- | crypto/algapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 7c41e7405c41..56c62e2858d5 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; |
