Skip to content
Commit 9ae4577b authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: api - Use work queue in crypto_destroy_instance



The function crypto_drop_spawn expects to be called in process
context.  However, when an instance is unregistered while it still
has active users, the last user may cause the instance to be freed
in atomic context.

Fix this by delaying the freeing to a work queue.

Fixes: 6bfd4809 ("[CRYPTO] api: Added spawns")
Reported-by: default avatarFlorent Revest <revest@chromium.org>
Reported-by: default avatar <syzbot+d769eed29cc42d75e2a3@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+610ec0671f51e838436e@syzkaller.appspotmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Tested-by: default avatarFlorent Revest <revest@chromium.org>
Acked-by: default avatarFlorent Revest <revest@chromium.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7999b615
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