Skip to content
Commit 52c05023 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Kevin Wolf
Browse files

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: default avatarConor Murphy <conor_murphy_virt@hotmail.com>
Tested-by: default avatarConor Murphy <conor_murphy_virt@hotmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 155eb9aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment