From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDfuK-00077R-SB for qemu-devel@nongnu.org; Wed, 12 Feb 2014 14:55:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDfuF-0000hS-Mo for qemu-devel@nongnu.org; Wed, 12 Feb 2014 14:55:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDfuF-0000hH-BN for qemu-devel@nongnu.org; Wed, 12 Feb 2014 14:55:39 -0500 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 s1CJtbqm021896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Feb 2014 14:55:38 -0500 Message-ID: <52FBD1B8.1000408@redhat.com> Date: Wed, 12 Feb 2014 12:55:36 -0700 From: Eric Blake MIME-Version: 1.0 References: <6994360a48564c05021509bf10dbe472ba7f61d6.1392234225.git.jcody@redhat.com> In-Reply-To: <6994360a48564c05021509bf10dbe472ba7f61d6.1392234225.git.jcody@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="23A7Juev9LVuDjX7Wj8geBaCdg2QpQDMx" Subject: Re: [Qemu-devel] [PATCH] block: mirror - insure that errp is not NULL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --23A7Juev9LVuDjX7Wj8geBaCdg2QpQDMx Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/12/2014 12:46 PM, Jeff Cody wrote: > When starting a block job, commit_active_start() relies on whether *err= p > is set by mirror_start_job. This allows it to determine if the mirror > job start failed, so that it can clean up any changes to open flags fro= m > the bdrv_reopen(). If errp is NULL, then it will not be able to > determine if mirror_start_job failed or not. >=20 > Reported-by: Markus Armbruster > Signed-off-by: Jeff Cody > --- > block/mirror.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/block/mirror.c b/block/mirror.c > index 2a43334..41bb83c 100644 > --- a/block/mirror.c > +++ b/block/mirror.c > @@ -634,6 +634,8 @@ void commit_active_start(BlockDriverState *bs, Bloc= kDriverState *base, > int64_t length, base_length; > int orig_base_flags; > =20 > + assert(errp !=3D NULL); > + assert(errp); is shorter, but I don't know if we have a preference for implicit conversion of pointers to bool context. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --23A7Juev9LVuDjX7Wj8geBaCdg2QpQDMx 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/ iQEcBAEBCAAGBQJS+9G4AAoJEKeha0olJ0NqfrIIAKayEHbpMqgUCPKRbK97DQYM 5zqedglwuq/4KEgqyn5QzGdPhVcvYpjUF3xPZOFEhqOn10ndA2ri807iB47/HVQV dHqQkQfMgzDdrzLeuUs+vwIq30Pov3R6vRAs2++wXq3zAMDJAt6Ser0Ar1CVmzJY bugTELh/VUBsdE/LRFzJwl7dWbjBmz/0n9WHnYkOhPiWZTgeX8faN33IIpXRDtlp qxe/3u6VPqdYqKn7BL9kkAUeIOib7niDP0YNtzO/xQDV7qtBylnbLFdUU8wlEUyt PKw1uw+uEyHcM2ZptGPBkzr47zqnwOvrW4eu+49S/XGFP9awsl6KC/qYF+kmgjg= =cjke -----END PGP SIGNATURE----- --23A7Juev9LVuDjX7Wj8geBaCdg2QpQDMx--