Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
qemu.4227
0307-virtio-decrement-vq-inuse-in-virtqu.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0307-virtio-decrement-vq-inuse-in-virtqu.patch of Package qemu.4227
From c1073ebc5b2be6eeb89ec158dd1904de2e121dd4 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi <stefanha@redhat.com> Date: Mon, 15 Aug 2016 13:54:16 +0100 Subject: [PATCH] virtio: decrement vq->inuse in virtqueue_discard() virtqueue_discard() moves vq->last_avail_idx back so the element can be popped again. It's necessary to decrement vq->inuse to avoid "leaking" the element count. Cc: qemu-stable@nongnu.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 58a83c61496eeb0d31571a07a51bc1947e3379ac) [BR: BSC#1015048] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/virtio/virtio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 4f0fdf168d..9f1e86b2b7 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -271,6 +271,7 @@ void virtqueue_discard(VirtQueue *vq, const VirtQueueElement *elem, unsigned int len) { vq->last_avail_idx--; + vq->inuse--; virtqueue_unmap_sg(vq, elem, len); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor