[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3576149.HSfW5KObBF@positron.chronox.de>
Date: Tue, 27 Dec 2016 23:39:57 +0100
From: Stephan Müller <smueller@...onox.de>
To: Ted Tso <tytso@....edu>
Cc: linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org
Subject: [PATCH 3/8] random: trigger random_ready callback upon crng_init == 1
The random_ready callback mechanism is intended to replicate the
getrandom system call behavior to in-kernel users. As the getrandom
system call unblocks with crng_init == 1, trigger the random_ready
wakeup call at the same time.
Signed-off-by: Stephan Mueller <smueller@...onox.de>
---
drivers/char/random.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 482531d..5c26b1c 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -810,6 +810,7 @@ static int crng_fast_load(const char *cp, size_t len)
}
if (crng_init_cnt >= CRNG_INIT_CNT_THRESH) {
crng_init = 1;
+ process_random_ready_list();
wake_up_interruptible(&crng_init_wait);
pr_notice("random: fast init done\n");
}
--
2.9.3
Powered by blists - more mailing lists