From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5FXY-0000wP-Ls for qemu-devel@nongnu.org; Fri, 02 Aug 2013 09:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5FXU-0000CV-Av for qemu-devel@nongnu.org; Fri, 02 Aug 2013 09:37:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5FXU-0000CM-1z for qemu-devel@nongnu.org; Fri, 02 Aug 2013 09:37:04 -0400 Message-ID: <51FBB5FC.90802@redhat.com> Date: Fri, 02 Aug 2013 07:37:00 -0600 From: Eric Blake MIME-Version: 1.0 References: <1375428840-5275-1-git-send-email-armbru@redhat.com> In-Reply-To: <1375428840-5275-1-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EbJuwPw9VqVvNii0IJ5n44ugUIx87MW2j" Subject: Re: [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaults() misuse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EbJuwPw9VqVvNii0IJ5n44ugUIx87MW2j Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/02/2013 01:34 AM, Markus Armbruster wrote: > Commit 6d4cd40 fixed qemu_opts_set_defaults() for an existing corner > case, but broke it for another one that can't be reached in current > code. >=20 >=20 > Not reachable, because we never pass lists with !list->merge_lists to > qemu_opts_set_defaults(). >=20 > Guard against possible (if unlikely) future misuse with assert(). >=20 > Reported-by: Peter Maydell > Signed-off-by: Markus Armbruster > --- > util/qemu-option.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > + * This code doesn't work for defaults && !list->merge_lists: when= > + * params has no id=3D, and list has an element with !opts->id, it= > + * appends a new element instead of returning the existing opts. > + * However, we got no use for this case. Guard against possible s/got/have/ Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --EbJuwPw9VqVvNii0IJ5n44ugUIx87MW2j 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR+7X8AAoJEKeha0olJ0Nq/CgH/3rfYaQlKprU48V05nFdzVl0 9TOR5mjWVBLa0/m3cSAEIQGRlOx79Y1yshSn7CfZYs5K7GR8QCLt84wKiRKORqJp HLaYg7i9cZ3K3teLZ38GYOU6LgYux0V4hJhuhcwyE/jcMAOzuikDrz+2CUMxKZf3 fQq8R8HVJ2POnV+SZd4OeyRDS59RAgmDqR601lDi23+O8bnwYiuGGWS4Os/+hW8K cqSK+Xo5/4VMf1TwH7AlGEFVzCQQaJRXNzPM0YOPqNjfm8sItSRxkiWtoyUGoW2c GluFTi43HhOzbTjponu/SFmjsYpGFdh5dPWIr74iCt6T/R3A3WJe26TI7iqG2Bk= =WkiD -----END PGP SIGNATURE----- --EbJuwPw9VqVvNii0IJ5n44ugUIx87MW2j--