summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/random.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 157a0b3..254407b 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1292,8 +1292,13 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
{
ssize_t n, retval = 0, count = 0;
- if (nbytes == 0)
+/*
+ * Kludge: zero-byte read: Fill the pool from upstream sources.
+ */
+ if (nbytes == 0){
+ fill_pool(&blocking_pool, 0);
return 0;
+ }
while (nbytes > 0) {
n = nbytes;