qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reminder: [PATCH v2] virtio-rng: return available data with O_NONBLOCK


From: Martin Wilck
Subject: Reminder: [PATCH v2] virtio-rng: return available data with O_NONBLOCK
Date: Tue, 11 Aug 2020 12:23:15 +0200
User-agent: Evolution 3.36.4

On Wed, 2020-07-15 at 15:32 +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@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-mwilck@suse.com/

Regards
Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]