diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2020-11-20 12:04:31 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-11-27 17:13:44 +1100 |
commit | dc3517474c0906e5dc11d1affd285f93edefedd0 (patch) | |
tree | 0a9b189dfc11f5fa0d93f541b0a20926600711f8 /crypto | |
parent | 34b8df62f1aa4d89e4865740d95bf763575afb7d (diff) | |
download | linux-crypto-dc3517474c0906e5dc11d1affd285f93edefedd0.tar.gz linux-crypto-dc3517474c0906e5dc11d1affd285f93edefedd0.zip |
crypto: tcrypt - don't initialize at subsys_initcall time
Commit 23311b0ed61a5 ("crypto: run initcalls for generic implementations
earlier") converted tcrypt.ko's module_init() to subsys_initcall(), but
this was unintentional: tcrypt.ko currently cannot be built into the core
kernel, and so the subsys_initcall() gets converted into module_init()
under the hood. Given that tcrypt.ko does not implement a generic version
of a crypto algorithm that has to be available early during boot, there
is no point in running the tcrypt init code earlier than implied by
module_init().
However, for crypto development purposes, we will lift the restriction
that tcrypt.ko must be built as a module, and when builtin, it makes sense
for tcrypt.ko (which does its work inside the module init function) to run
as late as possible. So let's switch to late_initcall() instead.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r-- | crypto/tcrypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index eea0f453..fc1f3e51 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -3066,7 +3066,7 @@ err_free_tv: */ static void __exit tcrypt_mod_fini(void) { } -subsys_initcall(tcrypt_mod_init); +late_initcall(tcrypt_mod_init); module_exit(tcrypt_mod_fini); module_param(alg, charp, 0); |