[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK |
Date: |
Tue, 11 Aug 2020 09:14:09 -0400 |
On Tue, Aug 11, 2020 at 03:00:14PM +0200, Laurent Vivier wrote:
> No problem. This code is tricky and it took me several months to really
> start to understand it ...
Oh great, we actually have someone who understands the code!
Maybe you can help me understand: virtio_read
takes the buf pointer and puts it in the vq.
It can then return to caller (e.g. on a signal).
Device can meanwhile write into the buffer.
It looks like if another call then happens, and that
other call uses a different buffer, virtio rng
will happily return the data written into the
original buf pointer, confusing the caller.
Is that right?
--
MST
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Philippe Mathieu-Daudé, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Laurent Vivier, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Martin Wilck, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Laurent Vivier, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Martin Wilck, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Laurent Vivier, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK,
Michael S. Tsirkin <=
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Laurent Vivier, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Michael S. Tsirkin, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Laurent Vivier, 2020/08/11
- Re: [PATCH v2] virtio-rng: return available data with O_NONBLOCK, Martin Wilck, 2020/08/11