On Wed, May 13, 2015 at 01:12:00PM +0000, Fam Zheng wrote:
> For zero write, callers pass in NULL qiov (qemu-io "write -z" or
> scsi-disk "write same").
> 
> Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case
> for this bug, but it still exists in bdrv_aio_write_zeroes. A simpler
> fix would be in bdrv_co_do_pwritev which is the NULL dereference point
> and covers both cases.
> 
> So don't access it in bdrv_co_do_pwritev in this case, use three aligned
> writes.
> 
> Signed-off-by: Fam Zheng <f...@redhat.com>
> ---
>  block/io.c | 97 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 95 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Attachment: pgpizYqXoAus2.pgp
Description: PGP signature

Reply via email to