This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 65176 - broken urandom (PATCH INCLUDED)
broken urandom (PATCH INCLUDED)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.3
All Linux
high Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-19 09:09 EDT by Gigs
Modified: 2007-03-26 23:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-19 18:13:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gigs 2002-05-19 09:09:33 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):
Kernel 2.4.18-3

How Reproducible:
Always

Steps to Reproduce:
1.  dd if=/dev/urandom of=/tmp/testfile bs=1M count=1
2.  
3.  

Actual Results:
testfile is very small, 1M is requested, several kilobytes is returned

Expected Results:
1M file o garbage

Additional Information:
	
--- random.c.orig	Thu Apr 18 06:50:33 2002
+++ random.c	Sun May 19 08:40:14 2002
@@ -1371,8 +1371,7 @@
 		add_timer_randomness(&extract_timer_state, nbytes);
 #if LOWLATENCY_NEEDED
 		/* This can happen in softirq's, but that's what we want */
-		if (conditional_schedule_needed())
-			break;
+		conditional_schedule();
 #endif
 	}
Comment 1 Gigs 2002-05-19 18:13:24 EDT
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 anyway.

So ignore the patch I gave and just remove the whole  #if LOWLATENCY_NEEDED.
Comment 2 Arjan van de Ven 2002-05-21 04:29:42 EDT
thanks for the report! Fixed for the next build

Note You need to log in before you can comment on or make changes to this bug.