diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 23:08:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 23:08:42 -0500 |
commit | 8912858bcb9e314549a4abc15db6b5841a96fa2c (patch) | |
tree | 92d815952374bc8f387452ab77ab3fb47e00c8f6 /crypto/algapi.c | |
parent | 423eaf8f00d89ca79bb2c9d4d22e92c9774e2d8a (diff) | |
parent | 38cb2419f544ad413c7f7aa8c17fd7377610cdd8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
[CRYPTO] api: Fix potential race in crypto_remove_spawn
[CRYPTO] authenc: Move initialisations up to shut up gcc
Diffstat (limited to 'crypto/algapi.c')
-rw-r--r-- | crypto/algapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index 8ff8c2656d9c..8383282de1dd 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -95,6 +95,9 @@ static void crypto_remove_spawn(struct crypto_spawn *spawn, | |||
95 | return; | 95 | return; |
96 | 96 | ||
97 | inst->alg.cra_flags |= CRYPTO_ALG_DEAD; | 97 | inst->alg.cra_flags |= CRYPTO_ALG_DEAD; |
98 | if (hlist_unhashed(&inst->list)) | ||
99 | return; | ||
100 | |||
98 | if (!tmpl || !crypto_tmpl_get(tmpl)) | 101 | if (!tmpl || !crypto_tmpl_get(tmpl)) |
99 | return; | 102 | return; |
100 | 103 | ||
@@ -335,9 +338,6 @@ int crypto_register_instance(struct crypto_template *tmpl, | |||
335 | LIST_HEAD(list); | 338 | LIST_HEAD(list); |
336 | int err = -EINVAL; | 339 | int err = -EINVAL; |
337 | 340 | ||
338 | if (inst->alg.cra_destroy) | ||
339 | goto err; | ||
340 | |||
341 | err = crypto_check_alg(&inst->alg); | 341 | err = crypto_check_alg(&inst->alg); |
342 | if (err) | 342 | if (err) |
343 | goto err; | 343 | goto err; |