From 91f3f1e304f2e9ff2c8b9c76efd4fb8ff93110f7 Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Wed, 6 Feb 2008 01:37:20 -0800 Subject: [PATCH] drivers/char/random.c:write_pool() cond_resched() needed Reduce latency for large writes to /dev/[u]random Signed-off-by: Matt Mackall Cc: Sami Farin Cc: Theodore Ts'o Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/random.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/char/random.c b/drivers/char/random.c index c511a831f0..f43c89f7c4 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1039,6 +1039,7 @@ write_pool(struct entropy_store *r, const char __user *buffer, size_t count) p += bytes; add_entropy_words(r, buf, (bytes + 3) / 4); + cond_resched(); } return 0; -- 2.39.5