diff options
author | Matt Mackall <mpm@selenic.com> | 2008-02-06 04:37:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:06 -0500 |
commit | 91f3f1e304f2e9ff2c8b9c76efd4fb8ff93110f7 (patch) | |
tree | 1a36c20c159b4ad24b16201dfe5e741dc31c563d | |
parent | 5ab24c79af5a05659f68eae3e5f232c9a15359d7 (diff) |
drivers/char/random.c:write_pool() cond_resched() needed
Reduce latency for large writes to /dev/[u]random
Signed-off-by: Matt Mackall <mpm@selenic.com>
Cc: Sami Farin <safari-kernel@safari.iki.fi>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/char/random.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
1039 | p += bytes; | 1039 | p += bytes; |
1040 | 1040 | ||
1041 | add_entropy_words(r, buf, (bytes + 3) / 4); | 1041 | add_entropy_words(r, buf, (bytes + 3) / 4); |
1042 | cond_resched(); | ||
1042 | } | 1043 | } |
1043 | 1044 | ||
1044 | return 0; | 1045 | return 0; |