summaryrefslogtreecommitdiffstats
path: root/drivers/char/random.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-21 04:19:54 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-27 05:51:45 -0400
commit1d9de44e268d880cbe2d0bd3be1ef0661f93fd34 (patch)
tree01d76396141709ae0d763eb8a4689b158eb511e7 /drivers/char/random.c
parent374d4ad18a0c4bc844dee42b3b43916e5f46608d (diff)
random: Wake up all getrandom(2) callers when pool is ready
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: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/random.c')
-rw-r--r--drivers/char/random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 9cd6968e2f92..8b8c46b5fd5c 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -660,7 +660,7 @@ retry:
660 r->entropy_total = 0; 660 r->entropy_total = 0;
661 if (r == &nonblocking_pool) { 661 if (r == &nonblocking_pool) {
662 prandom_reseed_late(); 662 prandom_reseed_late();
663 wake_up_interruptible(&urandom_init_wait); 663 wake_up_all(&urandom_init_wait);
664 pr_notice("random: %s pool is initialized\n", r->name); 664 pr_notice("random: %s pool is initialized\n", r->name);
665 } 665 }
666 } 666 }