mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 00:34:52 +00:00
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>
This commit is contained in:
parent
374d4ad18a
commit
1d9de44e26
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue