From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53E8EC433F5 for ; Sat, 7 May 2022 19:27:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387630AbiEGTav (ORCPT ); Sat, 7 May 2022 15:30:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231754AbiEGTan (ORCPT ); Sat, 7 May 2022 15:30:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0EFF1F60C for ; Sat, 7 May 2022 12:26:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 14A3360959 for ; Sat, 7 May 2022 19:26:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DC91C385A6; Sat, 7 May 2022 19:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1651951614; bh=JgTJgIHGYMFK0hU3vlZkqQAKJBZeHW+d7SlpswGidWQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=elVVnz+rabjmeIgdO9nzoBD4cMuFaJ49AYof7bFWRNd3Rcf9z9kJsNaShseCTb3SK 86Pw5NlKXJECJCFbJtIEFlgQXObejpZDaDR0KWC/zK0ps7qiFGLb52v03mmlD75SgN flLn1asQ8VC/KZuGIklt+oNLM69ZsDzfUCmN2ZDU= Date: Sat, 7 May 2022 12:26:53 -0700 From: Andrew Morton To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, Stafford Horne Subject: Re: [PATCH] init: call time_init() before rand_initialize() Message-Id: <20220507122653.e5ea43e8200568b348b7a16d@linux-foundation.org> In-Reply-To: <20220505003114.177552-1-Jason@zx2c4.com> References: <20220505003114.177552-1-Jason@zx2c4.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 5 May 2022 02:31:14 +0200 "Jason A. Donenfeld" 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.