Skip to content
Commit 38cb2419 authored by Herbert Xu's avatar Herbert Xu
Browse files

[CRYPTO] api: Fix potential race in crypto_remove_spawn



As it is crypto_remove_spawn may try to unregister an instance which is
yet to be registered.  This patch fixes this by checking whether the
instance has been registered before attempting to remove it.

It also removes a bogus cra_destroy check in crypto_register_instance as
1) it's outside the mutex;
2) we have a check in __crypto_register_alg already.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f347c4fa
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