Skip to content
Snippets Groups Projects
Commit 1fdd6ae3 authored by Herbert Xu's avatar Herbert Xu Committed by Patrick Tjin
Browse files

BACKPORT: random: Wake up all getrandom(2) callers when pool is ready


Clean cherry pick of 1d9de44e.

If more than one application invokes getrandom(2) before the pool
is ready, then all bar one will be stuck forever because we use
wake_up_interruptible which wakes up a single task.

This patch replaces it with wake_up_all.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>

Bug: http://b/29621447
Change-Id: I5dfd7abac10898802f030e0a2af7110809283328
(cherry picked from commit 1d9de44e)
parent 8b90c848
Branches
Tags
No related merge requests found
...@@ -621,7 +621,7 @@ retry: ...@@ -621,7 +621,7 @@ retry:
r->entropy_total = 0; r->entropy_total = 0;
if (r == &nonblocking_pool) { if (r == &nonblocking_pool) {
prandom_reseed_late(); prandom_reseed_late();
wake_up_interruptible(&urandom_init_wait); wake_up_all(&urandom_init_wait);
pr_notice("random: %s pool is initialized\n", r->name); pr_notice("random: %s pool is initialized\n", r->name);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment