Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91f3f1e3 authored by Matt Mackall's avatar Matt Mackall Committed by Linus Torvalds
Browse files

drivers/char/random.c:write_pool() cond_resched() needed



Reduce latency for large writes to /dev/[u]random

Signed-off-by: default avatarMatt Mackall <mpm@selenic.com>
Cc: Sami Farin <safari-kernel@safari.iki.fi>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5ab24c79
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1039,6 +1039,7 @@ write_pool(struct entropy_store *r, const char __user *buffer, size_t count)
		p += bytes;
		p += bytes;


		add_entropy_words(r, buf, (bytes + 3) / 4);
		add_entropy_words(r, buf, (bytes + 3) / 4);
		cond_resched();
	}
	}


	return 0;
	return 0;