[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v7 2/3] block: Fix NULL deference for unaligned

From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v7 2/3] block: Fix NULL deference for unaligned write if qiov is NULL
Date: Mon, 18 May 2015 11:00:27 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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 <address@hidden>
> ---
>  block/io.c | 97 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 95 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <address@hidden>

Attachment: pgplIqgfvStPd.pgp
Description: PGP signature

reply via email to

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