Skip to content
Commit fe222a6c authored by Jason A. Donenfeld's avatar Jason A. Donenfeld
Browse files

init: call time_init() before rand_initialize()



Currently time_init() is called after rand_initialize(), but
rand_initialize() makes use of the timer on various platforms, and
sometimes this timer needs to be initialized by time_init() first. In
order for random_get_entropy() to not return zero during early boot when
it's potentially used as an entropy source, reverse the order of these
two calls. The block doing random initialization was right before
time_init() before, so changing the order shouldn't have any complicated
effects.

Cc: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarStafford Horne <shorne@gmail.com>
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
parent 069c4ea6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment