0022-random-remove-stale-maybe_reseed_primary_crng.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. From 1eadc614c3546b2cef698c337c95034253c99771 Mon Sep 17 00:00:00 2001
  2. From: Stephan Mueller <stephan.mueller@atsec.com>
  3. Date: Thu, 15 Dec 2016 12:42:33 +0100
  4. Subject: [PATCH 22/32] random: remove stale maybe_reseed_primary_crng
  5. The function maybe_reseed_primary_crng is not used anywhere and thus can
  6. be removed.
  7. Signed-off-by: Stephan Mueller <smueller@chronox.de>
  8. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  9. ---
  10. drivers/char/random.c | 7 -------
  11. 1 file changed, 7 deletions(-)
  12. diff --git a/drivers/char/random.c b/drivers/char/random.c
  13. index a1214c0fbaf3..a6a6a357ddae 100644
  14. --- a/drivers/char/random.c
  15. +++ b/drivers/char/random.c
  16. @@ -853,13 +853,6 @@ static void crng_reseed(struct crng_state *crng, struct entropy_store *r)
  17. spin_unlock_irqrestore(&primary_crng.lock, flags);
  18. }
  19. -static inline void maybe_reseed_primary_crng(void)
  20. -{
  21. - if (crng_init > 2 &&
  22. - time_after(jiffies, primary_crng.init_time + CRNG_RESEED_INTERVAL))
  23. - crng_reseed(&primary_crng, &input_pool);
  24. -}
  25. -
  26. static inline void crng_wait_ready(void)
  27. {
  28. wait_event_interruptible(crng_init_wait, crng_ready());
  29. --
  30. 2.16.4