On 06/05/2019 19:33, Richard Henderson wrote:
We can always get EINTR for read; /dev/urandom is no exception.
Rearrange the order of tests for likelihood; allow degenerate buflen==0
case to perform a no-op zero-length read. This means that the normal
success path is a straight line with a single test for success.
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
v3: Rearrage the read loop again.
---
crypto/random-platform.c | 36 +++++++++++++++---------------------
1 file changed, 15 insertions(+), 21 deletions(-)
Reviewed-by: Laurent Vivier <lviv...@redhat.com>