From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMKos-00073S-Mc for qemu-devel@nongnu.org; Thu, 11 Oct 2012 11:37:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMKoi-0005kC-W9 for qemu-devel@nongnu.org; Thu, 11 Oct 2012 11:37:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMKoi-0005k8-Mt for qemu-devel@nongnu.org; Thu, 11 Oct 2012 11:36:56 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9BFauWN032691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Oct 2012 11:36:56 -0400 Message-ID: <5076E797.5080603@redhat.com> Date: Thu, 11 Oct 2012 09:36:55 -0600 From: Eric Blake MIME-Version: 1.0 References: <633f30c7b1812692ca9cd4497f502d5a7366e7e3.1349848348.git.jcody@redhat.com> In-Reply-To: <633f30c7b1812692ca9cd4497f502d5a7366e7e3.1349848348.git.jcody@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigC9C7E9D3273D159EFBC37576" Subject: Re: [Qemu-devel] [PATCH 2/2] block: in commit, determine base image from the top image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC9C7E9D3273D159EFBC37576 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/09/2012 11:56 PM, Jeff Cody wrote: > This simplifies some code and error checking, and also fixes a bug. >=20 > bdrv_find_backing_image() should only be passed absolute filenames, > or filenames relative to the chain. In the QMP message handler for > block commit, when looking up the base do so from the determined top > image, so we know it is reachable from top. >=20 > Signed-off-by: Jeff Cody > --- > +++ b/blockdev.c > @@ -1182,6 +1172,17 @@ void qmp_block_commit(const char *device, > return; > } > =20 > + if (base && has_base) { Code motion, but won't this order trigger valgrind warnings about jumping based on a read of uninitialized memory? That is, the canonical ordering is 'has_base && base' (although the end result is the same, with the difference only observable in valgrind). --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigC9C7E9D3273D159EFBC37576 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQdueXAAoJEKeha0olJ0NqazUH+wdk3CfKc636KRTT8XWD+UIw FsXAFuZg+yarIMo+ZlnEHrWJpO5GhN4ur7PQ7/PxO01N3lHREfeYc1zArvMMFbHB tF741lWvEAH3gQLRD00vmN0fkRkRT3YjqEzZVjUw6XhcVzOl0oe4gU78c9OobQ/s SvsMCcBWbbPzJ9e86Rpl5FM06i0zzKfhDINAoVV99QA4PrCVvFu7nwzmhCYfZy6o j7EPag26d6DR7qdgrufOchGOLQcIgCJjeR0OtenOgPcS+46JtIpJjO/Q2S1Lbzpc 7eT6G35g6VFyTQ7GtCCbUQCfMJiaK/79fZq9irQH6OoFIFrylL3qDtsn83SvL3E= =m2rn -----END PGP SIGNATURE----- --------------enigC9C7E9D3273D159EFBC37576--