Skip to content

Commit

Permalink
random: Don't wake crng_init_wait when crng_init == 1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/6fbc0bfcbfc1fa2c76fd574f5b6f552b11be7fde.1577088521.git.luto@kernel.org
Signed-off-by: Theodore Ts'o <[email protected]>
  • Loading branch information
amluto authored and tytso committed Jan 7, 2020
1 parent 1b710b1 commit 4c8d062
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4c8d062

Please sign in to comment.