Re: [PATCH] init: call time_init() before rand_initialize()

From: Andrew Morton
Date: Sat May 07 2022 - 15:27:06 EST


On Thu, 5 May 2022 02:31:14 +0200 "Jason A. Donenfeld" <Jason@xxxxxxxxx> wrote:

> Currently time_init() is called before rand_initialize(), but

You mean "after"! Changelog was really confusing until I went and
looked at the code.

> rand_initialize() makes use of the timer on various platforms, and
> sometimes this timer needs to be initialized by time_init() first. In
> order to not return zero,

return zero from what?

> 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.

I hope you're right. Moving these things around tends to fix one thing
and break another.

> Andrew - this file has no formal maintainer, but you've signed the most
> commits, so I'm CC'ing you. This has some interactions with my
> random.git tree, so unless there are objections, I'll queue it up there.

No probs. Plenty of testing in linux-next, please.