On Tue, 12 Apr 2016 14:25:30 +0100 Stefan Hajnoczi <stefa...@redhat.com> wrote:
> If the vring is invalid, tell the caller no bytes are available and mark > the device broken. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > hw/virtio/virtio.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > @@ -449,6 +449,11 @@ done: > if (out_bytes) { > *out_bytes = out_total; > } > + return; > + > +err: > + in_total = out_total = 0; > + goto done; This jumping around looks a bit weird, but I don't have any better idea. > } > > int virtqueue_avail_bytes(VirtQueue *vq, unsigned int in_bytes, Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com>