qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] libvhost-user: return on error in vu_log_queue_fill()


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/2] libvhost-user: return on error in vu_log_queue_fill()
Date: Mon, 21 Sep 2020 16:25:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 9/21/20 1:34 PM, Stefan Hajnoczi wrote:
> vu_panic() is not guaranteed to exit the program. Return early when
> errors are encountered.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  contrib/libvhost-user/libvhost-user.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/contrib/libvhost-user/libvhost-user.c 
> b/contrib/libvhost-user/libvhost-user.c
> index 27626e629a..1fc2cb12ce 100644
> --- a/contrib/libvhost-user/libvhost-user.c
> +++ b/contrib/libvhost-user/libvhost-user.c
> @@ -2722,6 +2722,7 @@ vu_log_queue_fill(VuDev *dev, VuVirtq *vq,
>      if (desc[i].flags & VRING_DESC_F_INDIRECT) {
>          if (desc[i].len % sizeof(struct vring_desc)) {
>              vu_panic(dev, "Invalid size for indirect buffer table");
> +            return;
>          }
>  
>          /* loop over the indirect descriptor table */
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

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