mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
crypto: api - Ensure cra_type->destroy is done in process context
Move the cra_type->destroy call out of crypto_alg_put and into crypto_unregister_alg and crypto_free_instance. This ensures that it's always done in process context so calls such as flush_work can be done. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
10
crypto/api.c
10
crypto/api.c
@@ -703,15 +703,5 @@ void crypto_req_done(void *data, int err)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_req_done);
|
||||
|
||||
void crypto_destroy_alg(struct crypto_alg *alg)
|
||||
{
|
||||
if (alg->cra_type && alg->cra_type->destroy)
|
||||
alg->cra_type->destroy(alg);
|
||||
|
||||
if (alg->cra_destroy)
|
||||
alg->cra_destroy(alg);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_destroy_alg);
|
||||
|
||||
MODULE_DESCRIPTION("Cryptographic core API");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
Reference in New Issue
Block a user