diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-24 11:49:55 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-24 11:49:55 (GMT) |
commit | 467388f29fc9cebfb70e7a187107b6b5d772cb44 (patch) | |
tree | 4e6fffa65f38addffc149a5fe88be3d2161eaf6e /crypto/algapi.c | |
parent | 028e1415a78733fcd2cba4b4c001826cc37a373e (diff) | |
parent | f7e603ad8f78cd3b59e33fa72707da0cbabdf699 (diff) | |
download | linux-fsl-qoriq-467388f29fc9cebfb70e7a187107b6b5d772cb44.tar.xz |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
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 7c41e74..56c62e2 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; |