qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 9/9] virtio-blk: Fix and clean up the in_sg a


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 9/9] virtio-blk: Fix and clean up the in_sg and out_sg check
Date: Fri, 06 Jun 2014 15:18:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 06/06/2014 15:16, Stefan Hajnoczi ha scritto:
> -    req->in = (void *)req->elem->in_sg[req->elem->in_num - 1].iov_base;
> +    assert(in_iov[in_num - 1].iov_len >=
> +           sizeof(struct virtio_blk_inhdr));
Why use assert() when the rest of the function uses error_report() +
exit(1)?  Please keep the code consistent.

Sorry, that's my fault. I suggested assert thinking that zero-length iovecs wouldn't be possible here.

Paolo



reply via email to

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