yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Pablo Greco e6a3ae
From 83da09b513ecdc9225188de859f4d35184094522 Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: Julia Suvorova <jusual@redhat.com>
Pablo Greco e6a3ae
Date: Tue, 4 Feb 2020 18:20:06 +0000
Pablo Greco e6a3ae
Subject: [PATCH 5/6] virtio: reset region cache when on queue deletion
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: Julia Suvorova <jusual@redhat.com>
Pablo Greco e6a3ae
Message-id: <20200204182007.183537-4-jusual@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 93704
Pablo Greco e6a3ae
O-Subject: [RHEL-8.2.0 qemu-kvm PATCH 3/4] virtio: reset region cache when on queue deletion
Pablo Greco e6a3ae
Bugzilla: 1708480
Pablo Greco e6a3ae
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
From: Yuri Benditovich <yuri.benditovich@daynix.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
https://bugzilla.redhat.com/show_bug.cgi?id=1708480
Pablo Greco e6a3ae
Fix leak of region reference that prevents complete
Pablo Greco e6a3ae
device deletion on hot unplug.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Cc: qemu-stable@nongnu.org
Pablo Greco e6a3ae
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Pablo Greco e6a3ae
Message-Id: <20191226043649.14481-2-yuri.benditovich@daynix.com>
Pablo Greco e6a3ae
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Pablo Greco e6a3ae
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Pablo Greco e6a3ae
(cherry picked from commit 421afd2fe8dd4603216cbf36081877c391f5a2a4)
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 hw/virtio/virtio.c | 1 +
Pablo Greco e6a3ae
 1 file changed, 1 insertion(+)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
Pablo Greco e6a3ae
index 624f6e2..c105873 100644
Pablo Greco e6a3ae
--- a/hw/virtio/virtio.c
Pablo Greco e6a3ae
+++ b/hw/virtio/virtio.c
Pablo Greco e6a3ae
@@ -1607,6 +1607,7 @@ void virtio_delete_queue(VirtQueue *vq)
Pablo Greco e6a3ae
     vq->vring.num_default = 0;
Pablo Greco e6a3ae
     vq->handle_output = NULL;
Pablo Greco e6a3ae
     vq->handle_aio_output = NULL;
Pablo Greco e6a3ae
+    virtio_virtqueue_reset_region_cache(vq);
Pablo Greco e6a3ae
 }
Pablo Greco e6a3ae
 
Pablo Greco e6a3ae
 void virtio_del_queue(VirtIODevice *vdev, int n)
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae