]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwrng: virtio - don't waste entropy
authorLaurent Vivier <lvivier@redhat.com>
Thu, 28 Oct 2021 10:11:10 +0000 (12:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:17 +0000 (08:37 +0200)
commit102a354d52ca46cbe1497ff8349752ca59e3458c
tree449363ad2e3fdee46b0d250bf2640787697952fe
parentf2a7dfd35f0c925f6b3963d7823369e4122855f3
hwrng: virtio - don't waste entropy

[ Upstream commit 5c8e933050044d6dd2a000f9a5756ae73cbe7c44 ]

if we don't use all the entropy available in the buffer, keep it
and use it later.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Link: https://lore.kernel.org/r/20211028101111.128049-4-lvivier@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stable-dep-of: ac52578d6e8d ("hwrng: virtio - Fix race on data_avail and actual data")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/hw_random/virtio-rng.c