mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/6] hw_random: explicit ordering of initcalls
@ 2022-01-24 20:29 Dominik Brodowski
  2022-01-24 20:29 ` [PATCH 2/6] hw_random: read() callback must be called for size of 32 or more bytes Dominik Brodowski
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Dominik Brodowski @ 2022-01-24 20:29 UTC (permalink / raw)
  To: Matt Mackall, Herbert Xu; +Cc: linux-kernel, linux-crypto, Jason A . Donenfeld

hw-random device drivers depend on the hw-random core being
initialized. Make this ordering explicit, also for the case
these drivers are built-in. As the core itself depends on
misc_register() which is set up at subsys_initcall time,
advance the initialization of the core (only) to the
fs_initcall() level.

Cc: Matt Mackall <mpm@selenic.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
 drivers/char/hw_random/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index a3db27916256..e860e044b19e 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char/hw_random/core.c
@@ -638,7 +638,7 @@ static void __exit hwrng_modexit(void)
 	unregister_miscdev();
 }
 
-module_init(hwrng_modinit);
+fs_initcall(hwrng_modinit); /* depends on misc_register() */
 module_exit(hwrng_modexit);
 
 MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver");
-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-02-05  4:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 20:29 [PATCH 1/6] hw_random: explicit ordering of initcalls Dominik Brodowski
2022-01-24 20:29 ` [PATCH 2/6] hw_random: read() callback must be called for size of 32 or more bytes Dominik Brodowski
2022-01-24 20:29 ` [PATCH 3/6] hw_random: use rng_fillbuf in add_early_randomness() Dominik Brodowski
2022-01-24 20:29 ` [PATCH 4/6] hw_random: only set cur_rng_set_by_user if it is working Dominik Brodowski
2022-01-24 20:29 ` [PATCH 5/6] hw_random: break out of hwrng_fillfn if current rng is not trusted Dominik Brodowski
2022-01-24 20:29 ` [PATCH 6/6] hw_random: credit entropy for low quality sources of randomness Dominik Brodowski
2022-01-28  7:02   ` [PATCH v2 " Dominik Brodowski
2022-02-05  4:30 ` [PATCH 1/6] hw_random: explicit ordering of initcalls Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®