From 91f3f1e304f2e9ff2c8b9c76efd4fb8ff93110f7 Mon Sep 17 00:00:00 2001 From: Matt Mackall Date: Wed, 6 Feb 2008 01:37:20 -0800 Subject: 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(+) (limited to 'drivers/char/random.c') diff --git a/drivers/char/random.c b/drivers/char/random.c index c511a831f0c0..f43c89f7c449 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; -- cgit v1.2.3-58-ga151