qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 06/10] virtio: handle virtqueue_get_avail_byt


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v3 06/10] virtio: handle virtqueue_get_avail_bytes() errors
Date: Tue, 20 Sep 2016 13:44:52 +0200

On Tue, 12 Apr 2016 14:25:30 +0100
Stefan Hajnoczi <address@hidden> wrote:

> If the vring is invalid, tell the caller no bytes are available and mark
> the device broken.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  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 <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]