Red Hat Bugzilla – Bug 65176
broken urandom (PATCH INCLUDED)
Last modified: 2007-03-26 23:53:23 EDT
Description of Problem:
/dev/urandom is broken by some lowlatency code that is apparently incorrect.
It causes read calls to urandom to return incomplete.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. dd if=/dev/urandom of=/tmp/testfile bs=1M count=1
testfile is very small, 1M is requested, several kilobytes is returned
1M file o garbage
--- random.c.orig Thu Apr 18 06:50:33 2002
+++ random.c Sun May 19 08:40:14 2002
@@ -1371,8 +1371,7 @@
/* This can happen in softirq's, but that's what we want */
- if (conditional_schedule_needed())
Andrew Morton said:
>Yeah, unfortunately it's called under spinlock, so we can't schedule
>from there (I think).
>I guess I'll just remove that chunk - it's only worth a millisecond or
So ignore the patch I gave and just remove the whole #if LOWLATENCY_NEEDED.
thanks for the report! Fixed for the next build