Re: [Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Fam Zheng
On Tue, 05/12 13:52, Kevin Wolf wrote: > Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: > > 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

Re: [Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Fam Zheng
On Tue, 05/12 13:18, Stefan Hajnoczi wrote: > On Tue, May 12, 2015 at 02:09:31PM +0800, Fam Zheng wrote: > > +static int coroutine_fn bdrv_co_do_zero_pwritev(BlockDriverState *bs, > > +int64_t offset, > > +

Re: [Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Stefan Hajnoczi
On Tue, May 12, 2015 at 02:09:31PM +0800, Fam Zheng wrote: > +static int coroutine_fn bdrv_co_do_zero_pwritev(BlockDriverState *bs, > +int64_t offset, > +unsigned int bytes, > +

Re: [Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-12 Thread Kevin Wolf
Am 12.05.2015 um 08:09 hat Fam Zheng geschrieben: > 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 wo

[Qemu-block] [PATCH v6 2/3] block: Fix NULL deference for unaligned write if qiov is NULL

2015-05-11 Thread Fam Zheng
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 poi