On Tue, Jul 01, 2014 at 04:52:21PM +0200, Kevin Wolf wrote: > When mirroring an image of a size that is not a multiple of the > mirror job granularity, the last request would have the right nb_sectors > argument, but a qiov that is rounded up to the next multiple of the > granularity. Don't do this. > > This fixes a segfault that is caused by raw-posix being confused by this > and allocating a buffer with request length, but operating on it with > qiov length. > > Reported-by: Eric Blake <ebl...@redhat.com> > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block/mirror.c | 4 +++- > tests/qemu-iotests/041 | 5 +++++ > tests/qemu-iotests/041.out | 4 ++-- > 3 files changed, 10 insertions(+), 3 deletions(-)
Applied Eric's suggestion. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan
pgp55KAmcI6bW.pgp
Description: PGP signature