On Wed, 2020-07-15 at 15:32 +0200, mwi...@suse.com wrote: > From: Martin Wilck <mwi...@suse.com> > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > non-blocking read() to retrieve random data, it ends up in a tight > loop with poll() always returning POLLIN and read() returning EAGAIN. > This repeats forever until some process makes a blocking read() call. > The reason is that virtio_read() always returns 0 in non-blocking > mode, > even if data is available. Worse, it fetches random data from the > hypervisor after every non-blocking call, without ever using this > data.
Gentle review reminder. https://patchew.org/QEMU/20200715133255.10526-1-mwi...@suse.com/ Regards Martin