The patch titled hw_random core: block read, if !O_NONBLOCK has been added to the -mm tree. Its filename is add-new-generic-hw-rng-core-hw_random-core-rewrite-chrdev-read-method-hw_random-core-block-read-if-o_nonblock.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: hw_random core: block read, if !O_NONBLOCK From: Michael Buesch <mb@xxxxxxxxx> Block reads to /dev/hwrng if O_NONBLOCK is not set. This restores the old behavior, to not break userland (rngd). Thanks to <Valdis.Kletnieks@xxxxxx> for pointing out the issue. Signed-off-by: Michael Buesch <mb@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/char/hw_random/core.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/char/hw_random/core.c~add-new-generic-hw-rng-core-hw_random-core-rewrite-chrdev-read-method-hw_random-core-block-read-if-o_nonblock drivers/char/hw_random/core.c --- 25/drivers/char/hw_random/core.c~add-new-generic-hw-rng-core-hw_random-core-rewrite-chrdev-read-method-hw_random-core-block-read-if-o_nonblock Fri May 26 16:52:31 2006 +++ 25-akpm/drivers/char/hw_random/core.c Fri May 26 16:52:31 2006 @@ -125,7 +125,7 @@ static ssize_t rng_dev_read(struct file mutex_unlock(&rng_mutex); err = -EAGAIN; - if (!bytes_read) + if (!bytes_read && (filp->f_flags & O_NONBLOCK)) goto out; err = -EFAULT; @@ -138,6 +138,9 @@ static ssize_t rng_dev_read(struct file data >>= 8; } + if (need_resched()) + schedule_timeout_interruptible(1); + err = -ERESTARTSYS; if (signal_pending(current)) goto out; } _ Patches currently in -mm which might be from mb@xxxxxxxxx are git-netdev-all.patch remove-old-hw-rng-support.patch add-new-generic-hw-rng-core.patch add-new-generic-hw-rng-core-cleanups.patch add-new-generic-hw-rng-core-hw_random-core-rewrite-chrdev-read-method.patch add-new-generic-hw-rng-core-maintainers.patch add-new-generic-hw-rng-core-hw_random-core-rewrite-chrdev-read-method-hw_random-core-block-read-if-o_nonblock.patch add-intel-hw-rng-driver.patch add-intel-hw-rng-driver-cleanups.patch add-amd-hw-rng-driver.patch add-geode-hw-rng-driver.patch add-geode-hw-rng-driver-cleanups.patch add-via-hw-rng-driver.patch add-via-hw-rng-driver-cleanups.patch add-ixp4xx-hw-rng-driver.patch add-ti-omap-cpu-family-hw-rng-driver.patch add-bcm43xx-hw-rng-support.patch capi-crash--race-condition.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html