crypto: api - Do not wait for tests during registration
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 17 Aug 2024 06:57:40 +0000 (14:57 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 24 Aug 2024 13:39:15 +0000 (21:39 +0800)
commit37da5d0ffa7b61f79156fbbd3369f17b9a1638bd
tree7f82fc3f993918c8e540d12f2ebe2d6ae4498eb7
parent96ad595520591f8bd9c5fbe901b56561fa9c8a9e
crypto: api - Do not wait for tests during registration

As registration is usually carried out during module init, this
is a context where as little work as possible should be carried
out.  Testing may trigger module loads of underlying components,
which could even lead back to the module that is registering at
the moment.  This may lead to dead-locks outside of the Crypto API.

Avoid this by not waiting for the tests to complete.  They will
be scheduled but completion will be asynchronous.  Any users will
still wait for completion.

Reported-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algapi.c
crypto/api.c
crypto/internal.h