Skip to content

virtio-rng: make device ready before making request

Justin M. Forbes requested to merge jmflinuxtx/kernel-ark:virtio_rng into os-build

No need to review, this patch is in -next and should merge soon, but it should fix a bug that is preventing rawhide composes from succeeding so I am including in releases until it lands.

Justin

Current virtio-rng does a entropy request before DRIVER_OK, this violates the spec:

virtio spec requires that all drivers set DRIVER_OK before using devices.

Further, kernel will ignore the interrupt after commit 8b4ec69d ("virtio: harden vring IRQ").

Fixing this by making device ready before the request.

Cc: stable@vger.kernel.org Fixes: 8b4ec69d ("virtio: harden vring IRQ") Fixes: f7f510ec ("virtio: An entropy device, as suggested by hpa.") Reported-and-tested-by: syzbot+5b59d6d459306a556f54@syzkaller.appspotmail.com Signed-off-by: Jason Wang jasowang@redhat.com Message-Id: 20220608061422.38437-1-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin mst@redhat.com Reviewed-by: Laurent Vivier lvivier@redhat.com

Merge request reports