summary refs log tree commit diff stats
path: root/hw/intc
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2016-09-21 16:52:25 +0100
committerMichael S. Tsirkin <mst@redhat.com>2016-09-23 19:03:56 +0300
commit4355c1abcaedd64a18d627284a3b7e54acb00714 (patch)
treebf94f26ae2d93b310bac84496bd550c46fe0ccb0 /hw/intc
parent412e0e81b17488e228b4f8451df6a4af26064bb4 (diff)
downloadfocaccia-qemu-4355c1abcaedd64a18d627284a3b7e54acb00714.tar.gz
focaccia-qemu-4355c1abcaedd64a18d627284a3b7e54acb00714.zip
virtio: handle virtqueue_num_heads() errors
If the avail ring index is bogus virtqueue_num_heads() must return
-EINVAL.

The only caller is virtqueue_get_avail_bytes().  Return saying no bytes
are available when virtqueue_num_heads() fails.

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>
Diffstat (limited to 'hw/intc')
0 files changed, 0 insertions, 0 deletions