linux/crypto
Herbert Xu 34c9a0ffc7 crypto: fix broken crypto_register_instance() module handling
Commit 9c521a200b ("crypto: api - remove instance when test failed")
tried to grab a module reference count before the module was even set.

Worse, it then goes on to free the module reference count after it is
set so you quickly end up with a negative module reference count which
prevents people from using any instances belonging to that module.

This patch moves the module initialisation before the reference
count.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 20:26:16 -07:00
..
asymmetric_keys
async_tx
842.c
Kconfig crypto: serpent_sse2 - Fix a typo in Kconfig 2015-04-07 21:34:20 +08:00
Makefile crypto: algif - enable AEAD interface compilation 2015-03-04 22:12:39 +13:00
ablk_helper.c crypto: cryptd - process CRYPTO_ALG_INTERNAL 2015-03-31 21:21:04 +08:00
ablkcipher.c
aead.c
aes_generic.c
af_alg.c crypto: af_alg - make exports consistant 2015-04-01 15:32:20 -04:00
ahash.c
algapi.c crypto: fix broken crypto_register_instance() module handling 2015-04-15 20:26:16 -07:00
algboss.c
algif_aead.c crypto: fix mis-merge with the networking merge 2015-04-15 14:09:46 -07:00
algif_hash.c new helper: msg_data_left() 2015-04-11 15:53:35 -04:00
algif_rng.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-04-15 10:42:15 -07:00
algif_skcipher.c new helper: msg_data_left() 2015-04-11 15:53:35 -04:00
ansi_cprng.c crypto: rng - RNGs must return 0 in success case 2015-03-09 21:06:18 +11:00
anubis.c
api.c crypto: api - prevent helper ciphers from being used 2015-03-31 21:21:03 +08:00
arc4.c
authenc.c
authencesn.c
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
chainiv.c
cipher.c
cmac.c
compress.c
crc32.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c crypto: cryptd - process CRYPTO_ALG_INTERNAL 2015-03-31 21:21:04 +08:00
crypto_null.c
crypto_user.c crypto: user - Fix crypto_alg_match race 2015-04-08 22:20:06 +08:00
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
drbg.c crypto: rng - RNGs must return 0 in success case 2015-03-09 21:06:18 +11:00
ecb.c
eseqiv.c
fcrypt.c
fips.c
gcm.c
gf128mul.c
ghash-generic.c
hash_info.c
hmac.c
internal.h
khazad.c
krng.c
lrw.c
lz4.c
lz4hc.c
lzo.c
mcryptd.c crypto: mcryptd - process CRYPTO_ALG_INTERNAL 2015-03-31 21:21:13 +08:00
md4.c
md5.c
memneq.c
michael_mic.c
pcbc.c
pcompress.c
pcrypt.c
proc.c crypto: proc - identify internal ciphers 2015-03-31 21:21:04 +08:00
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
salsa20_generic.c
scatterwalk.c
seed.c
seqiv.c
serpent_generic.c
sha1_generic.c crypto: sha1-generic - move to generic glue implementation 2015-04-10 21:39:40 +08:00
sha256_generic.c crypto: sha256-generic - move to generic glue implementation 2015-04-10 21:39:41 +08:00
sha512_generic.c crypto: sha512-generic - move to generic glue implementation 2015-04-10 21:39:41 +08:00
shash.c
tcrypt.c crypto: tcrypt - fix uninit sg entries in test_acipher_speed 2015-03-12 01:11:05 +11:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - use CRYPTO_ALG_INTERNAL 2015-03-31 21:21:03 +08:00
testmgr.h
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c
zlib.c