Skip to content
Snippets Groups Projects
Commit 76c9b330 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Justin M. Forbes
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 9b33410d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment