crypto: api - Do not create test larvals if manager is disabled
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 19 Oct 2021 13:28:02 +0000 (21:28 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Oct 2021 13:04:02 +0000 (21:04 +0800)
commitcad439fc040efe5f4381e3a7d583c5c200dbc186
treecaf41548f2537f6e37f080fddb39c040620e2cf5
parent3ae88f676aa63366ffa9eebb8ae787c7e19f0c57
crypto: api - Do not create test larvals if manager is disabled

The delayed boot-time testing patch created a dependency loop
between api.c and algapi.c because it added a crypto_alg_tested
call to the former when the crypto manager is disabled.

We could instead avoid creating the test larvals if the crypto
manager is disabled.  This avoids the dependency loop as well
as saving some unnecessary work, albeit in a very unlikely case.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Fixes: adad556efcdd ("crypto: api - Fix built-in testing dependency failures")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algapi.c
crypto/api.c