Bug 65176 - broken urandom (PATCH INCLUDED)
Summary: broken urandom (PATCH INCLUDED)
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 7.3
Hardware: All Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-05-19 13:09 UTC by Gigs
Modified: 2007-03-27 03:53 UTC (History)
0 users

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

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:110 normal SHIPPED_LIVE Updated kernel with bugfixes available 2002-06-10 04:00:00 UTC

Description Gigs 2002-05-19 13:09:33 UTC
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:

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

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);
 		/* This can happen in softirq's, but that's what we want */
-		if (conditional_schedule_needed())
-			break;
+		conditional_schedule();

Comment 1 Gigs 2002-05-19 22:13:24 UTC
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 08:29:42 UTC
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.