diff --git a/drivers/char/random.c b/drivers/char/random.c index ea5b92946045..3fe39fe24f56 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -2285,8 +2285,12 @@ void add_hwgenerator_randomness(const char *buffer, size_t count, struct entropy_store *poolp = &input_pool; if (unlikely(crng_init == 0)) { - crng_fast_load(buffer, count); - return; + size_t ret = crng_fast_load(buffer, count); + mix_pool_bytes(poolp, buffer, ret); + count -= ret; + buffer += ret; + if (!count || crng_init == 0) + return; } /* Suspend writing if we're above the trickle threshold.