FAILED: patch "[PATCH] virtio-rng: make device ready before making request" failed to apply to 4.9-stable tree
[email protected]
maintainerThe patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 228432551bd8783211e494ab35f42a4344580502 Mon Sep 17 00:00:00 2001
From: Jason Wang <[email protected]>
Date: Wed, 8 Jun 2022 14:14:22 +0800
Subject: [PATCH] virtio-rng: make device ready before making request
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 8b4ec69d7e09 ("virtio: harden vring IRQ").
Fixing this by making device ready before the request.
Message-Id: <[email protected]>
drivers/char/hw_random/virtio-rng.c +2 -0
@@ -159,6 +159,8 @@ static int probe_common(struct virtio_device *vdev) goto err_find; } +virtio_device_ready (vdev); +/* we always have a pending entropy request */ request_entropy (vi);