linux-stable/crypto
Herbert Xu c4cb61c5f9 crypto: api - Use work queue in crypto_destroy_instance
[ Upstream commit 9ae4577bc0 ]

The function crypto_drop_spawn expects to be called in process
context.  However, when an instance is unregistered while it still
has active users, the last user may cause the instance to be freed
in atomic context.

Fix this by delaying the freeing to a work queue.

Fixes: 6bfd48096f ("[CRYPTO] api: Added spawns")
Reported-by: Florent Revest <revest@chromium.org>
Reported-by: syzbot+d769eed29cc42d75e2a3@syzkaller.appspotmail.com
Reported-by: syzbot+610ec0671f51e838436e@syzkaller.appspotmail.com
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Florent Revest <revest@chromium.org>
Acked-by: Florent Revest <revest@chromium.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:32 +02:00
..
asymmetric_keys KEYS: asymmetric: Copy sig and digest in public_key_verify_signature() 2023-06-09 10:34:28 +02:00
async_tx
842.c
acompress.c
adiantum.c
aead.c
aegis.h
aegis128-core.c
aegis128-neon-inner.c
aegis128-neon.c
aes_generic.c
aes_ti.c
af_alg.c
ahash.c
akcipher.c
algapi.c crypto: api - Use work queue in crypto_destroy_instance 2023-09-13 09:42:32 +02:00
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c
arc4.c
aria_generic.c
authenc.c
authencesn.c
blake2b_generic.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
cfb.c
chacha20poly1305.c
chacha_generic.c
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crc64_rocksoft_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c
crypto_engine.c crypto: engine - fix crypto_queue backlog handling 2023-05-17 11:53:40 +02:00
crypto_null.c
crypto_user_base.c
crypto_user_stat.c
ctr.c
cts.c
curve25519-generic.c
deflate.c
des_generic.c
dh.c
dh_helper.c
drbg.c crypto: drbg - Only fail when jent is unavailable in FIPS mode 2023-05-11 23:03:21 +09:00
ecb.c
ecc.c
ecc_curve_defs.h
ecdh.c
ecdh_helper.c
ecdsa.c
ecdsasignature.asn1
echainiv.c
ecrdsa.c
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
essiv.c crypto: essiv - Handle EBUSY correctly 2023-03-10 09:32:56 +01:00
fcrypt.c
fips.c
gcm.c
geniv.c
gf128mul.c
ghash-generic.c
hash_info.c
hctr2.c
hmac.c
internal.h
jitterentropy-kcapi.c crypto: jitter - permanent and intermittent health errors 2023-05-24 17:32:38 +01:00
jitterentropy.c crypto: jitter - correct health test during initialization 2023-07-19 16:21:42 +02:00
jitterentropy.h crypto: jitter - permanent and intermittent health errors 2023-05-24 17:32:38 +01:00
Kconfig
kdf_sp800108.c
keywrap.c
khazad.c
kpp.c
lrw.c
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
Makefile
md4.c
md5.c
michael_mic.c
nhpoly1305.c
ofb.c
pcbc.c
pcrypt.c
poly1305_generic.c
polyval-generic.c
proc.c
ripemd.h
rmd160.c
rng.c
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - Use helper to set reqsize 2023-09-13 09:42:26 +02:00
rsa.c
rsa_helper.c
rsaprivkey.asn1
rsapubkey.asn1
scatterwalk.c
scompress.c
seed.c
seqiv.c crypto: seqiv - Handle EBUSY correctly 2023-03-10 09:32:56 +01:00
serpent_generic.c
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c
simd.c
skcipher.c
sm2.c
sm2signature.asn1
sm3.c
sm3_generic.c
sm4.c
sm4_generic.c
streebog_generic.c
tcrypt.c
tcrypt.h
tea.c
testmgr.c crypto: testmgr - fix RNG performance in fuzz tests 2023-05-24 17:32:53 +01:00
testmgr.h
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xctr.c
xor.c
xts.c crypto: xts - Handle EBUSY correctly 2023-03-10 09:32:57 +01:00
xxhash_generic.c
zstd.c