crypto: hkdf - move to late_initcall
authorEric Biggers <ebiggers@google.com>
Tue, 10 Jun 2025 19:16:00 +0000 (12:16 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 11 Jun 2025 02:59:45 +0000 (10:59 +0800)
The HKDF self-tests depend on the HMAC algorithms being registered.
HMAC is now registered at module_init, which put it at the same level as
HKDF.  Move HKDF to late_initcall so that it runs afterwards.

Fixes: ef93f1562803 ("Revert "crypto: run initcalls for generic implementations earlier"")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/hkdf.c

index f24c2a8d4df99a1f410f3f34f19f1ee0f1e69edd..82d1b32ca6ce474869570f7533c039590b68349d 100644 (file)
@@ -566,7 +566,7 @@ static int __init crypto_hkdf_module_init(void)
 
 static void __exit crypto_hkdf_module_exit(void) {}
 
-module_init(crypto_hkdf_module_init);
+late_initcall(crypto_hkdf_module_init);
 module_exit(crypto_hkdf_module_exit);
 
 MODULE_LICENSE("GPL");