[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/67] virtio-balloon: discard virtqueue element on
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 06/67] virtio-balloon: discard virtqueue element on reset |
Date: |
Wed, 14 Dec 2016 18:44:00 -0600 |
From: Ladi Prosek <address@hidden>
The one pending element is being freed but not discarded on device
reset, which causes svq->inuse to creep up, eventually hitting the
"Virtqueue size exceeded" error.
Properly discarding the element on device reset makes sure that its
buffers are unmapped and the inuse counter stays balanced.
Cc: Michael S. Tsirkin <address@hidden>
Cc: Roman Kagan <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>
Signed-off-by: Ladi Prosek <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit 104e70cae78bd4afd95d948c6aff188f10508a9c)
Signed-off-by: Michael Roth <address@hidden>
---
hw/virtio/virtio-balloon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 5af429a..ad4189a 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -463,6 +463,7 @@ static void virtio_balloon_device_reset(VirtIODevice *vdev)
VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
if (s->stats_vq_elem != NULL) {
+ virtqueue_discard(s->svq, s->stats_vq_elem, 0);
g_free(s->stats_vq_elem);
s->stats_vq_elem = NULL;
}
--
1.9.1
- [Qemu-devel] [PATCH 57/67] block/curl: Do not wait for data beyond EOF, (continued)
- [Qemu-devel] [PATCH 57/67] block/curl: Do not wait for data beyond EOF, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 05/67] virtio: zero vq->inuse in virtio_reset(), Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 59/67] ivshmem: Fix 64 bit memory bar configuration, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 66/67] msmouse: Fix segfault caused by free the chr before chardev cleanup., Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 60/67] pci-assign: sync MSI/MSI-X cap and table with PCIDevice, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 07/67] vnc: fix qemu crash because of SIGSEGV, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 62/67] intel_iommu: fix incorrect device invalidate, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 63/67] vhost-user-test: Use libqos instead of pxe-virtio.rom, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 64/67] vl: Delay initialization of memory backends, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 65/67] Revert "megasas: remove useless check for cmd->frame", Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 06/67] virtio-balloon: discard virtqueue element on reset,
Michael Roth <=
- [Qemu-devel] [PATCH 67/67] vfio/pci: Fix vfio_rtl8168_quirk_data_read address offset, Michael Roth, 2016/12/14
- [Qemu-devel] [PATCH 08/67] 9pfs: fix potential segfault during walk, Michael Roth, 2016/12/14
- Re: [Qemu-devel] [PATCH 00/67] Patch Round-up for stable 2.7.1, freeze on 2016-12-20, Stefan Weil, 2016/12/15