From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X25el-0003cP-9P for qemu-devel@nongnu.org; Tue, 01 Jul 2014 17:32:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X25eg-0006tf-4i for qemu-devel@nongnu.org; Tue, 01 Jul 2014 17:32:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X25ef-0006ta-RT for qemu-devel@nongnu.org; Tue, 01 Jul 2014 17:31:58 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s61LVuWw031786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 1 Jul 2014 17:31:56 -0400 Message-ID: <53B328CB.1080405@redhat.com> Date: Tue, 01 Jul 2014 15:31:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <1404226342-20174-1-git-send-email-kwolf@redhat.com> <1404226342-20174-2-git-send-email-kwolf@redhat.com> <53B2E76A.9000704@redhat.com> In-Reply-To: <53B2E76A.9000704@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2G1D4vjgtVlUn1anw1P8c2MVHR8VXWIrr" Subject: Re: [Qemu-devel] [PATCH for-2.1 1/2] mirror: Fix qiov size for short requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2G1D4vjgtVlUn1anw1P8c2MVHR8VXWIrr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/01/2014 10:52 AM, Eric Blake wrote: > 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_secto= rs >> 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 th= is >> and allocating a buffer with request length, but operating on it with >> qiov length. >> >> Reported-by: Eric Blake >> Signed-off-by: Kevin Wolf >> --- >> block/mirror.c | 4 +++- >> tests/qemu-iotests/041 | 5 +++++ >> tests/qemu-iotests/041.out | 4 ++-- >> 3 files changed, 10 insertions(+), 3 deletions(-) >> >=20 >> +++ b/tests/qemu-iotests/041 >> @@ -219,6 +219,11 @@ class TestSingleDriveZeroLength(TestSingleDrive):= >> test_small_buffer2 =3D None >> test_large_cluster =3D None >> =20 >> +class TestSingleDriverUnalignedLength(TestSingleDrive): >=20 > s/Driver/Drive/ for consistency in the class name? >=20 Other than that: Tested-by: Eric Blake Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --2G1D4vjgtVlUn1anw1P8c2MVHR8VXWIrr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTsyjLAAoJEKeha0olJ0NqzdgIAKiaviuUsC34DbWlSGV/oLxw nRFk3yje0oJABub1BqV8vRW6f2WKe5slItZUZHm/2qHZQGrCuZJlX5WpyyV1LeBl nQrtqKoLDE2rQIWHKiaeFew0pO/N40PF6Y63cwT9roxQgI8FrryUjKSTqpn5dnz5 PaXsyWICcb3h4CEnJk0rc5/nv9pR5890J0je7j08i2vXEd1BByE2plWzeO0f+AG0 uAZ/V3s5Ove7l91PVP3SdymZqNnifxl7T6A8DWnFr9oO7RslgSrET40SudNucbdx A/Zd0YlsoRdb4DBKz8UFUANIfPss8/qgL5NyW/uVw4FDVBDVWo/Xlf4bUVEPmsY= =Rz4+ -----END PGP SIGNATURE----- --2G1D4vjgtVlUn1anw1P8c2MVHR8VXWIrr--