]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-balloon: discard virtqueue element on reset
authorLadi Prosek <lprosek@redhat.com>
Wed, 7 Sep 2016 15:20:47 +0000 (17:20 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 2 Nov 2016 21:41:33 +0000 (16:41 -0500)
commit520d4b288fa71ea2b3ff0e256cc6d9608d16e7c1
treed205f576706ff83e136f96c3338530fc283dc15c
parent4b6542dd17257dda43937839230f3eca4c8048e7
virtio-balloon: discard virtqueue element on reset

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 <mst@redhat.com>
Cc: Roman Kagan <rkagan@virtuozzo.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 104e70cae78bd4afd95d948c6aff188f10508a9c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio-balloon.c