On Tue, 12 Apr 2016 14:25:33 +0100 Stefan Hajnoczi <stefa...@redhat.com> wrote:
> 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 <stefa...@redhat.com> > --- > hw/virtio/virtio.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com>