virtio: handle virtqueue_get_head() errors
commitfb1131b674e492a5f91abd77b9fcc9a9e2b88eb7
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 21 Sep 2016 15:52:26 +0000 (21 16:52 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 23 Sep 2016 16:03:56 +0000 (23 19:03 +0300)
tree45d5ff959cfe2e064150b64eb198d862a2c2d71c
parent4355c1abcaedd64a18d627284a3b7e54acb00714
virtio: handle virtqueue_get_head() errors

Stop processing the vring if virtqueue_get_head() fetches an
out-of-bounds head index.

Signed-off-by: Stefan Hajnoczi <stefanha@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>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/virtio/virtio.c