Explorar o código

Kernel: Initialize TimeManagement before using KernelRNG

We should initialize the timers before KernelRNG as the RNG may want
to utilize system time as an entropy source.

Fixes #8710
Tom %!s(int64=4) %!d(string=hai) anos
pai
achega
3cca9e6704
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      Kernel/init.cpp

+ 3 - 2
Kernel/init.cpp

@@ -144,14 +144,15 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init()
     InterruptManagement::initialize();
     ACPI::initialize();
 
+    // Initialize TimeManagement before using randomness!
+    TimeManagement::initialize(0);
+
     __stack_chk_guard = get_fast_random<u32>();
 
     ProcFSComponentRegistry::initialize();
     Thread::initialize();
     Process::initialize();
 
-    TimeManagement::initialize(0);
-
     Scheduler::initialize();
 
     dmesgln("Starting SerenityOS...");