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: NConor Murphy <conor_murphy_virt@hotmail.com> Tested-by: NConor Murphy <conor_murphy_virt@hotmail.com> Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Showing
想要评论请 注册 或 登录