[PATCH] random: don't ratelimit add_interrupt_randomness() until crng is ready

From: Sultan Alsawaf
Date: Sun Apr 29 2018 - 18:44:27 EST


---
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 38729baed6ee..8c00c008e797 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1201,7 +1201,7 @@ void add_interrupt_randomness(int irq, int irq_flags)
}

if ((fast_pool->count < 64) &&
- !time_after(now, fast_pool->last + HZ))
+ !time_after(now, fast_pool->last + HZ) && crng_ready())
return;

r = &input_pool;
--
2.14.1