Commit bc881bfc authored by Herbert Xu's avatar Herbert Xu Committed by Treehugger Robot
Browse files

UPSTREAM: crypto: api - Fix boot-up self-test race



During the boot process self-tests are postponed so that all
algorithms are registered when the test starts.  In the event
that algorithms are still being registered during these tests,
which can occur either because the algorithm is registered at
late_initcall, or because a self-test itself triggers the creation
of an instance, some self-tests may never start at all.

Fix this by setting the flag at the start of crypto_start_tests.

Note that this race is theoretical and has never been observed
in practice.

Bug: 254441685
Fixes: adad556e ("crypto: api - Fix built-in testing dependency failures")
Signed-off-by: default avatarHerbert Xu <herbert.xu@redhat.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 8dd458cb)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ib9615714ad0885e0faf6cc7f4c64c987d856f182
parent 78433898
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment