Skip to content
Commit 1f723710 authored by Herbert Xu's avatar Herbert Xu
Browse files

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 13cf394c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment