diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2019-12-07 22:15:15 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-11 04:35:31 -0800 |
commit | f0a235bd332c3568b2b1b7d32c08a5dfc02c3b64 (patch) | |
tree | 67754e75e47f6c9adb056987beff434dcb293dea /crypto/internal.h | |
parent | a9edfdb29f48bdea757bbd057cab816edf58b4d2 (diff) | |
download | linux-crypto-f0a235bd332c3568b2b1b7d32c08a5dfc02c3b64.tar.gz linux-crypto-f0a235bd332c3568b2b1b7d32c08a5dfc02c3b64.zip |
crypto: api - Fix race condition in crypto_spawn_alg
commit bc1d8cb6169a2deb7dbcad8ac6ed8ade1bc2bb05 upstream.
The function crypto_spawn_alg is racy because it drops the lock
before shooting the dying algorithm. The algorithm could disappear
altogether before we shoot it.
This patch fixes it by moving the shooting into the locked section.
Fixes: 525ed3dcb430 ("[CRYPTO] api: Added spawns")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | crypto/internal.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/internal.h b/crypto/internal.h index 93df7bec..e506a57e 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -68,7 +68,6 @@ void crypto_alg_tested(const char *name, int err); void crypto_remove_spawns(struct crypto_alg *alg, struct list_head *list, struct crypto_alg *nalg); void crypto_remove_final(struct list_head *list); -void crypto_shoot_alg(struct crypto_alg *alg); struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type, u32 mask); void *crypto_create_tfm(struct crypto_alg *alg, |