diff options
author | Christoph Hellwig <hch@lst.de> | 2011-04-06 20:28:34 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-04-07 15:55:06 +0200 |
commit | 52c050236eaa4f0b5e1d160cd66dc18106445c4d (patch) | |
tree | bed1a80f12117eb1962461886b92aebd4dbfee98 /kvm-all.c | |
parent | 155eb9aa09249874b4ff49e94c58595ad82d3abb (diff) | |
download | qemu-52c050236eaa4f0b5e1d160cd66dc18106445c4d.zip qemu-52c050236eaa4f0b5e1d160cd66dc18106445c4d.tar.gz qemu-52c050236eaa4f0b5e1d160cd66dc18106445c4d.tar.bz2 |
virtio-blk: fail unaligned requests
Like all block drivers virtio-blk should not allow small than block size
granularity access. But given that the protocol specifies a
byte unit length field we currently accept such requests, which cause
qemu to abort() in lower layers. Add checks to the main read and
write handlers to catch them early.
Reported-by: Conor Murphy <conor_murphy_virt@hotmail.com>
Tested-by: Conor Murphy <conor_murphy_virt@hotmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'kvm-all.c')
0 files changed, 0 insertions, 0 deletions