From: Matt Mackall Date: Wed, 6 Feb 2008 09:37:20 +0000 (-0800) Subject: drivers/char/random.c:write_pool() cond_resched() needed X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=91f3f1e304f2e9ff2c8b9c76efd4fb8ff93110f7;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;