From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2GFM-0005xC-S3 for qemu-devel@nongnu.org; Wed, 02 Jul 2014 04:50:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2GFF-0001ca-4d for qemu-devel@nongnu.org; Wed, 02 Jul 2014 04:50:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2GFE-0001cN-Rv for qemu-devel@nongnu.org; Wed, 02 Jul 2014 04:50:25 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s628oOCj001598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 2 Jul 2014 04:50:24 -0400 Date: Wed, 2 Jul 2014 10:50:22 +0200 From: Kevin Wolf Message-ID: <20140702085022.GD5996@noname.str.redhat.com> References: <1404226342-20174-1-git-send-email-kwolf@redhat.com> <1404226342-20174-2-git-send-email-kwolf@redhat.com> <53B2E76A.9000704@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <53B2E76A.9000704@redhat.com> 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: Eric Blake Cc: qemu-devel@nongnu.org, stefanha@redhat.com --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > 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. > >=20 > > 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 >=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? Yes, that was a typo. Thanks for catching it. Kevin --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTs8fOAAoJEH8JsnLIjy/WqHoP+wekuym7WhsVgAG2U/TXlCzY CLLHMpgBsqk2TCI2wKvl0itDgOoaZmRxPsVJ1durQxtb9+ycA3+UGzk4UliAMB18 oXWP6TcTGXZZ7VeMYvs1n29ZnDLJYHSi9WANdIbEzkW1mg399vUkeBdXAwuy433Q 9KE5QK4aHWv17WzC3GN3mu+s67wuxR9z7Y97BJqhJOtP/hJ+oEt5kO/lN2pDL+Sb 6xWVeVWUxfVZ5gltcJGdJOqAZAEzt6zuoL5915UdDqy/gHJjv5Om7uVYsCLBlR9N U1MLMV2wjj/UW2ajDCCab7sLS4mma5FTKRjcnHQPodwpxfWL1qke0CSvxcY9KqjL 3YBvipwPuhfdExjTfHQH8kGhE9wcX+4na5HFntV40Cr8S0tRTN/Y57KClRBRM3FU ZqTx2l2oWZ5o206cNc38Ta8ptvxmb0qX+ofOBuUUKFyRuUjVZzQhCDpFknjQAipT ZDuNI2bA5JFYz+OP8v2+8jyuLqkMou8jrHPzyYm7hrDFYZ48BqvsO4EO7EA6zXz0 doHxaonhWmK54YlT7nP7HNyWreeRqa8PLIBQH/jO879GltpHnJRgD02E77copSP2 JGRbu0SDNGan7HH5bArl0dXJ+ctl0rjkkIq2hIbwptgG/n+JIKsrGBmWwEIEW/xz 3nckzmydQDtrTkdV3uOj =VbaY -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--