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: https://git.stricted.de/?a=commitdiff_plain;h=91f3f1e304f2e9ff2c8b9c76efd4fb8ff93110f7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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;