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-Tag: v2.6.25-rc1~709 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91f3f1e304f2e9ff2c8b9c76efd4fb8ff93110f7;p=linux-2.6 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 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;