« Previous | Next » 

Revision 52c05023

ID52c050236eaa4f0b5e1d160cd66dc18106445c4d

Added by Christoph Hellwig about 13 years ago

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 <>
Tested-by: Conor Murphy <>
Signed-off-by: Christoph Hellwig <>
Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences