Re: [PATCH] random: fix add_hwgenerator_randomness entropy accounting

From: Jason A. Donenfeld
Date: Mon Apr 04 2022 - 18:00:33 EST


Hi Jan,

On Mon, Apr 4, 2022 at 5:29 PM Jan Varho <jan.varho@xxxxxxxxx> wrote:
> I thought about doing it that way, but the return value allows
> checking that any input was actually used instead of fast init
> completing in the mean time.

I'm not too worried about races here. If lots of things are fighting
to inject entropy here, we're not in a starved situation. Also, the
other callers aren't looking at the return value. Let's keep it
simple; there's little harm in doing so in this instance.

Jason