diff options
| author | 2009-02-25 16:40:10 +0100 | |
|---|---|---|
| committer | 2009-02-25 16:40:10 +0100 | |
| commit | 2e31add2a7e2a15d07f592c21ba35870fa9a1d1f (patch) | |
| tree | 814e2c70fb5528f108114c0da6e5a1e219e6a0e1 /crypto/algapi.c | |
| parent | x86 PAT: ioremap_wc should take resource_size_t parameter (diff) | |
| parent | gpu/drm, x86, PAT: PAT support for io_mapping_* (diff) | |
| download | wireguard-linux-2e31add2a7e2a15d07f592c21ba35870fa9a1d1f.tar.xz wireguard-linux-2e31add2a7e2a15d07f592c21ba35870fa9a1d1f.zip | |
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; |
