summaryrefslogtreecommitdiff
path: root/crypto/internal.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2019-12-07 22:15:15 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 16:48:38 +0800
commitbc1d8cb6169a2deb7dbcad8ac6ed8ade1bc2bb05 (patch)
tree05d67f852eecd755f29595aeabac40223b4e9624 /crypto/internal.h
parentbc39d9486351deb0881a382c6c2d52b73467d304 (diff)
downloadlinux-crypto-bc1d8cb6169a2deb7dbcad8ac6ed8ade1bc2bb05.tar.gz
linux-crypto-bc1d8cb6169a2deb7dbcad8ac6ed8ade1bc2bb05.zip
crypto: api - Fix race condition in crypto_spawn_alg
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>
Diffstat (limited to '')
-rw-r--r--crypto/internal.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/internal.h b/crypto/internal.h
index ff06a3bd..d5ebc60c 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -65,7 +65,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,