diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-16 11:07:13 +0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 20:26:16 -0700 |
commit | d6648305e24043502a8b44b913ca32bef4884674 (patch) | |
tree | 18698bd133759643fd511702fe91efb889256cb7 /crypto/scatterwalk.c | |
parent | d65dfe811f8a0124e493018e1d930f5ba92edc23 (diff) | |
download | linux-crypto-d6648305e24043502a8b44b913ca32bef4884674.tar.gz linux-crypto-d6648305e24043502a8b44b913ca32bef4884674.zip |
crypto: fix broken crypto_register_instance() module handling
Commit 8e239e586ec3 ("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>
Diffstat (limited to 'crypto/scatterwalk.c')
0 files changed, 0 insertions, 0 deletions