[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v7 2/3] block: Fix NULL deference for unaligned
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [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>
pgpcEsN9voDWh.pgp
Description: PGP signature
- [Qemu-block] [PATCH v7 0/3] block: Fix unaligned bdrv_aio_write_zeroes, Fam Zheng, 2015/05/13
- [Qemu-block] [PATCH v7 1/3] Revert "block: Fix unaligned zero write", Fam Zheng, 2015/05/13
- [Qemu-block] [PATCH v7 2/3] block: Fix NULL deference for unaligned write if qiov is NULL, Fam Zheng, 2015/05/13
- Re: [Qemu-block] [PATCH v7 2/3] block: Fix NULL deference for unaligned write if qiov is NULL,
Stefan Hajnoczi <=
- [Qemu-block] [PATCH v7 3/3] qemu-iotests: Test unaligned sub-block zero write, Fam Zheng, 2015/05/13
- Re: [Qemu-block] [PATCH v7 0/3] block: Fix unaligned bdrv_aio_write_zeroes, Stefan Hajnoczi, 2015/05/18
- Re: [Qemu-block] [PATCH v7 0/3] block: Fix unaligned bdrv_aio_write_zeroes, Stefan Hajnoczi, 2015/05/18