aboutsummaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2015-05-13 13:12:00 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2015-05-22 09:37:33 +0100
commit9eeb6dd1b27bd57eb4e3869290e87feac8e8b226 (patch)
tree317043affdb0927412984180dfb38aa8b993aed2 /HACKING
parentd01c07f2221ca39ab2dd9e55932d99db98103b30 (diff)
block: Fix NULL deference for unaligned write if qiov is NULL
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. [Initialize ret to 0 in bdrv_co_do_zero_pwritev() to avoid uninitialized variable warning with gcc 4.9.2. --Stefan] Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1431522721-3266-3-git-send-email-famz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'HACKING')
0 files changed, 0 insertions, 0 deletions