Skip to content

hwrng: don't fetch data before device init

Amit Shah lkml stable virtualization 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hwrng: don't fetch rng from sources without initdrivers/char/hw_random/core.c+5 -35 replies
2/2virtio: rng: introduce an init fn for hwrng coredrivers/char/hw_random/virtio-rng.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] hwrng: don't fetch data before device init

Hi,

When booting a recent kernel under KVM with the virtio-rng device enabled, the boot process was stalling. Bisect pointed to a commit made during the 3.15 window to fetch randomness from newly-registered devices in the hwrng core. The details are in the patches.

I considered a couple of approaches, but basing on the init() function being registered, as is done in patch 1 here, seems like the best idea, since quite a few drivers need to initialize their devices before data is fetched off them.

Please review and apply if appropriate,

Amit Shah (2):
hwrng: don't fetch rng from sources without init
virtio: rng: introduce an init fn for hwrng core

 drivers/char/hw_random/core.c       |  8 +++++---
 drivers/char/hw_random/virtio-rng.c | 11 +++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.3