mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
34 lines
1 KiB
Diff
34 lines
1 KiB
Diff
|
From 4d56e2fa3339828c89f640a9a6ffeb7a538c6448 Mon Sep 17 00:00:00 2001
|
||
|
From: Herbert Xu <herbert@gondor.apana.org.au>
|
||
|
Date: Thu, 21 May 2015 16:19:54 +0800
|
||
|
Subject: [PATCH 5/5] 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>
|
||
|
---
|
||
|
drivers/char/random.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/drivers/char/random.c b/drivers/char/random.c
|
||
|
index a3150a06dbba..27eafd7e01f9 100644
|
||
|
--- a/drivers/char/random.c
|
||
|
+++ b/drivers/char/random.c
|
||
|
@@ -660,7 +660,7 @@ retry:
|
||
|
r->entropy_total = 0;
|
||
|
if (r == &nonblocking_pool) {
|
||
|
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);
|
||
|
}
|
||
|
}
|
||
|
--
|
||
|
2.12.2
|
||
|
|