summaryrefslogtreecommitdiffstats
path: root/drivers/char/dtlk.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2021-10-28 12:11:08 +0200
committerMichael S. Tsirkin <mst@redhat.com>2021-11-01 10:26:47 +0100
commitbf3175bc50a3754dc427e2f5046e17a9fafc8be7 (patch)
treef9e87bffbd3de715dd8758f42d0c6af4ecc6c8d6 /drivers/char/dtlk.c
parentvdpa/mlx5: Propagate link status from device to vdpa driver (diff)
downloadlinux-bf3175bc50a3754dc427e2f5046e17a9fafc8be7.tar.xz
linux-bf3175bc50a3754dc427e2f5046e17a9fafc8be7.zip
hwrng: virtio - add an internal buffer
hwrng core uses two buffers that can be mixed in the virtio-rng queue. If the buffer is provided with wait=0 it is enqueued in the virtio-rng queue but unused by the caller. On the next call, core provides another buffer but the first one is filled instead and the new one queued. And the caller reads the data from the new one that is not updated, and the data in the first one are lost. To avoid this mix, virtio-rng needs to use its own unique internal buffer at a cost of a data copy to the caller buffer. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Link: https://lore.kernel.org/r/20211028101111.128049-2-lvivier@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/char/dtlk.c')
0 files changed, 0 insertions, 0 deletions