diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-16 05:07:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-16 05:26:16 +0200 |
commit | 34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085 (patch) | |
tree | 293687562728755c0cd9186bfa8f9137a6b1cc92 /drivers/acpi/int340x_thermal.c | |
parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
download | linux-34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085.tar.xz linux-34c9a0ffc75ad25b6a60f61e27c4a4b1189b8085.zip |
crypto: fix broken crypto_register_instance() module handling
Commit 9c521a200bc3 ("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 'drivers/acpi/int340x_thermal.c')
0 files changed, 0 insertions, 0 deletions