Skip to content

Commit

Permalink
drivers/char/random.c:write_pool() cond_resched() needed
Browse files Browse the repository at this point in the history
Reduce latency for large writes to /dev/[u]random

Signed-off-by: Matt Mackall <[email protected]>
Cc: Sami Farin <[email protected]>
Cc: Theodore Ts'o <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Matt Mackall authored and Linus Torvalds committed Feb 6, 2008
1 parent 5ab24c7 commit 91f3f1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 91f3f1e

Please sign in to comment.