[SRU][F/aws][PATCH 2/5] random: Don't wake crng_init_wait when crng_init == 1
Andrea Righi
andrea.righi at canonical.com
Fri May 7 08:15:44 UTC 2021
From: Andy Lutomirski <luto at kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1927692
crng_init_wait is only used to wayt for crng_init to be set to 2, so
there's no point to waking it when crng_init is set to 1. Remove the
unnecessary wake_up_interruptible() call.
Signed-off-by: Andy Lutomirski <luto at kernel.org>
Link: https://lore.kernel.org/r/6fbc0bfcbfc1fa2c76fd574f5b6f552b11be7fde.1577088521.git.luto@kernel.org
Signed-off-by: Theodore Ts'o <tytso at mit.edu>
(cherry picked from commit 4c8d062186d9923c09488716b2fb1b829b5b8006)
Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
drivers/char/random.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index dd30ee135123..3089aee11a7e 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -946,7 +946,6 @@ static int crng_fast_load(const char *cp, size_t len)
if (crng_init_cnt >= CRNG_INIT_CNT_THRESH) {
invalidate_batched_entropy();
crng_init = 1;
- wake_up_interruptible(&crng_init_wait);
pr_notice("random: fast init done\n");
}
return 1;
--
2.30.2
More information about the kernel-team
mailing list