alistair23-linux/crypto
Herbert Xu b8e15992b4 crypto: api - Fix algorithm test race that broke aead initialisation
When we complete a test we'll notify everyone waiting on it, drop
the mutex, and then remove the test larval (after reacquiring the
mutex).  If one of the notified parties tries to register another
algorithm with the same driver name prior to the removal of the
test larval, they will fail with EEXIST as only one algorithm of
a given name can be tested at any time.

This broke the initialisation of aead and givcipher algorithms as
they will register two algorithms with the same driver name, in
sequence.

This patch fixes the problem by marking the larval as dead before
we drop the mutex, and also ignoring all dead or dying algorithms
on the registration path.

Tested-by: Andreas Steffen <andreas.steffen@strongswan.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2009-01-28 14:09:59 +11:00
..
async_tx dmaengine: replace dma_async_client_register with dmaengine_get 2009-01-06 11:38:17 -07:00
ablkcipher.c
aead.c
aes_generic.c crypto: aes - Precompute tables 2008-12-25 11:05:13 +11:00
ahash.c crypto: hash - Make setkey optional 2008-12-25 11:02:06 +11:00
algapi.c crypto: api - Fix algorithm test race that broke aead initialisation 2009-01-28 14:09:59 +11:00
algboss.c crypto: cryptomgr - Test ciphers using ECB 2008-08-29 15:49:58 +10:00
ansi_cprng.c crypto: ansi_cprng - fix inverted DT increment routine 2008-12-25 11:01:49 +11:00
anubis.c
api.c crypto: api - Rebirth of crypto_alloc_tfm 2008-12-25 11:01:24 +11:00
arc4.c
authenc.c crypto: authenc - Fix zero-length IV crash 2009-01-15 15:33:49 +11:00
blkcipher.c crypto: blkcipher - Fix WARN_ON handling in walk_done 2009-01-27 17:11:13 +11:00
blowfish.c
camellia.c crypto: camellia - use kernel-provided bitops, unaligned access 2008-12-25 11:01:15 +11:00
cast5.c
cast6.c
cbc.c
ccm.c crypto: ccm - Fix handling of null assoc data 2009-01-27 17:11:15 +11:00
chainiv.c crypto: skcipher - Use RNG interface instead of get_random_bytes 2008-08-29 15:50:06 +10:00
cipher.c
compress.c
crc32c.c libcrc32c: Move implementation to crypto crc32c 2008-12-25 11:01:40 +11:00
cryptd.c
crypto_null.c crypto: null - Switch to shash 2008-12-25 11:02:07 +11:00
ctr.c
cts.c
deflate.c
des_generic.c crypto: des3_ede - permit weak keys unless REQ_WEAK_KEY set 2008-12-25 11:02:28 +11:00
digest.c crypto: hash - Fix digest size check for digest type 2008-08-13 20:08:38 +10:00
ecb.c
eseqiv.c crypto: skcipher - Use RNG interface instead of get_random_bytes 2008-08-29 15:50:06 +10:00
fcrypt.c crypto: remove uses of __constant_{endian} helpers 2008-12-25 11:02:03 +11:00
fips.c crypto: api - Add fips_enable flag 2008-08-29 15:50:02 +10:00
gcm.c
gf128mul.c
hash.c
hmac.c crypto: hash - Export shash through hash 2008-12-25 11:01:33 +11:00
internal.h crypto: api - Rebirth of crypto_alloc_tfm 2008-12-25 11:01:24 +11:00
Kconfig crypto: sha512 - Switch to shash 2008-12-25 11:02:27 +11:00
khazad.c
krng.c crypto: rng - RNG interface and implementation 2008-08-29 15:50:04 +10:00
lrw.c
lzo.c
Makefile crypto: hash - Add shash interface 2008-12-25 11:01:26 +11:00
md4.c crypto: md4 - Switch to shash 2008-12-25 11:02:16 +11:00
md5.c crypto: md5 - Switch to shash 2008-12-25 11:02:18 +11:00
michael_mic.c crypto: michael_mic - Switch to shash 2008-12-25 11:02:24 +11:00
pcbc.c
proc.c crypto: api - Call type show function before legacy for proc 2008-12-25 11:01:32 +11:00
ripemd.h
rmd128.c crypto: rmd128 - Switch to shash 2008-12-25 11:02:09 +11:00
rmd160.c crypto: rmd160 - Switch to shash 2008-12-25 11:02:10 +11:00
rmd256.c crypto: rmd256 - Switch to shash 2008-12-25 11:02:12 +11:00
rmd320.c crypto: rmd320 - Switch to shash 2008-12-25 11:02:13 +11:00
rng.c crypto: rng - RNG interface and implementation 2008-08-29 15:50:04 +10:00
salsa20_generic.c crypto: salsa20 - Remove private wrappers around various operations 2008-12-25 11:02:30 +11:00
scatterwalk.c
seed.c
seqiv.c crypto: skcipher - Use RNG interface instead of get_random_bytes 2008-08-29 15:50:06 +10:00
serpent.c
sha1_generic.c crypto: sha1 - Switch to shash 2008-12-25 11:02:15 +11:00
sha256_generic.c crypto: sha256 - Switch to shash 2008-12-25 11:02:19 +11:00
sha512_generic.c crypto: sha512 - Switch to shash 2008-12-25 11:02:27 +11:00
shash.c crypto: hash - Make setkey optional 2008-12-25 11:02:06 +11:00
tcrypt.c crypto: cryptomgr - Add test infrastructure 2008-08-29 15:49:55 +10:00
tcrypt.h crypto: cryptomgr - Add test infrastructure 2008-08-29 15:49:55 +10:00
tea.c
testmgr.c crypto: testmgr - Validate output length in (de)compression tests 2008-12-25 11:02:04 +11:00
testmgr.h crypto: testmgr - Correct comment about deflate parameters 2008-12-25 11:02:32 +11:00
tgr192.c crypto: tgr192 - Switch to shash 2008-12-25 11:02:21 +11:00
twofish.c
twofish_common.c
wp512.c crypto: wp512 - Switch to shash 2008-12-25 11:02:22 +11:00
xcbc.c
xor.c
xts.c