Re: [PATCH 2/2] Override drivers/char/random only after FIPS-mode RNGs become available

From: Greg KH
Date: Sat Jun 28 2025 - 02:12:37 EST


On Sat, Jun 28, 2025 at 04:29:18AM +0000, Jay Wang wrote:
> This commit fixes a timing issue introduced in the previous commit
> "crypto: rng - Override drivers/char/random in FIPS mode" where the crypto RNG
> was attempting to override the drivers/char/random interface before the default
> RNG became available. The previous implementation would immediately register the
> external RNG during module initialization, which could fail if the default RNG
> wasn't ready.

Why isn't this just part of the previous commit so that there is no
regression anywhere?

thanks,

greg k-h