Commit f5c9060c authored by Herbert Xu's avatar Herbert Xu Committed by Lee Jones
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: I28fe2abfaac22e27a5c34f8613d60b9790d5858e
parent 5f0cdd59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment