Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crypto: fix broken crypto_register_instance() module handling
Commit 9c521a2 ("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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information