diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-02 22:31:22 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-03 17:53:32 +0800 |
commit | 0c6ae139da9aad73445691476b989e6036c37a20 (patch) | |
tree | d693887e8c0bf4e40ca7636f404203c9b0f53fc7 /crypto/internal.h | |
parent | da4bf302300b6ff56ef73030f5dc07c008921481 (diff) | |
download | linux-crypto-0c6ae139da9aad73445691476b989e6036c37a20.tar.gz linux-crypto-0c6ae139da9aad73445691476b989e6036c37a20.zip |
crypto: api - Fix races in crypto_unregister_instance
There are multiple problems in crypto_unregister_instance:
1) The cra_refcnt BUG_ON check is racy and can cause crashes.
2) The cra_refcnt check shouldn't exist at all.
3) There is no reference on tmpl to protect the tmpl->free call.
This patch rewrites the function using crypto_remove_spawn which
now morphs into crypto_remove_instance.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions