FAILED: patch "[PATCH] drm/virtio: Reset device before deleting virtqueues on freeze" failed to apply to 7.2-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 7.2-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]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.2.y
git checkout FETCH_HEAD
git cherry-pick -x 8907eb42c08b8eebe0f81fee256b34b5675d0e5a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026102122-pounce-posted-bd6e@gregkh' --subject-prefix 'PATCH 7.2.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8907eb42c08b8eebe0f81fee256b34b5675d0e5a Mon Sep 17 00:00:00 2001
From: Yuho Choi <[email protected]>
Date: Sat, 26 Sep 2026 16:20:27 -0400
Subject: [PATCH] drm/virtio: Reset device before deleting virtqueues on freeze
virtgpu_freeze() waits for the control and cursor queues to drain and then deletes the virtqueues, but nothing tells the device to stop first. del_vqs() frees the vring backing, but does not provide a generic device quiesce operation. In particular, modern virtio-pci keeps enabled queues active until the device is reset, so the device is left DRIVER_OK with its queues pointing at memory that has been freed and may be reused while the guest is suspended. virtio_device_restore() only resets the device later, on resume.
Reset the device before deleting the virtqueues, the way virtio_gpu_deinit() already does on removal.
drivers/gpu/drm/virtio/virtgpu_drv.c +1 -0
@@ -225,6 +225,7 @@ static int virtgpu_freeze(struct virtio_device *vdev) goto err_resume; } +virtio_reset_device (vdev); vdev->config->del_vqs (vdev);return 0 ;