qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short req


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short requests
Date: Wed, 2 Jul 2014 10:50:22 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 01.07.2014 um 18:52 hat Eric Blake geschrieben:
> On 07/01/2014 08:52 AM, 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 <address@hidden>
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> >  block/mirror.c             | 4 +++-
> >  tests/qemu-iotests/041     | 5 +++++
> >  tests/qemu-iotests/041.out | 4 ++--
> >  3 files changed, 10 insertions(+), 3 deletions(-)
> > 
> 
> > +++ b/tests/qemu-iotests/041
> > @@ -219,6 +219,11 @@ class TestSingleDriveZeroLength(TestSingleDrive):
> >      test_small_buffer2 = None
> >      test_large_cluster = None
> >  
> > +class TestSingleDriverUnalignedLength(TestSingleDrive):
> 
> s/Driver/Drive/ for consistency in the class name?

Yes, that was a typo. Thanks for catching it.

Kevin

Attachment: pgp4T85zwuk1j.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]