[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2 1/4] virtio: fix up max size checks

From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v2 1/4] virtio: fix up max size checks
Date: Thu, 19 Jan 2017 10:46:19 +0100

On Wed, 18 Jan 2017 22:55:40 +0200
"Michael S. Tsirkin" <address@hidden> wrote:

> Coverity reports that ARRAY_SIZE(elem->out_sg) (and all the others too)
> is wrong because elem->out_sg is a pointer.
> However, the check is not in the right place and the max_size argument
> of virtqueue_map_iovec can be removed.  The check on in_num/out_num
> should be moved to qemu_get_virtqueue_element instead, before the call
> to virtqueue_alloc_element.
> Cc: address@hidden
> Reported-by: Paolo Bonzini <address@hidden>
> Fixes: 3724650db07057333879484c8bc7d900b5c1bf8e ("virtio: introduce 
> virtqueue_alloc_element")
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>  hw/virtio/virtio.c | 33 +++++++++++++--------------------
>  1 file changed, 13 insertions(+), 20 deletions(-)

Reviewed-by: Cornelia Huck <address@hidden>

reply via email to

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