From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTpxM-000200-7t for qemu-devel@nongnu.org; Tue, 16 Sep 2014 06:26:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTpxH-0002lt-Am for qemu-devel@nongnu.org; Tue, 16 Sep 2014 06:25:56 -0400 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:43139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTpxH-0002ki-3S for qemu-devel@nongnu.org; Tue, 16 Sep 2014 06:25:51 -0400 Received: by mail-we0-f177.google.com with SMTP id u57so5441790wes.36 for ; Tue, 16 Sep 2014 03:25:47 -0700 (PDT) Date: Tue, 16 Sep 2014 11:25:44 +0100 From: Stefan Hajnoczi Message-ID: <20140916102544.GA22174@stefanha-thinkpad.redhat.com> References: <1410833973-9492-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <1410833973-9492-1-git-send-email-arei.gonglei@huawei.com> Subject: Re: [Qemu-devel] [PATCH] qdev-monitor: fix segmentation fault on qdev_device_help() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: weidong.huang@huawei.com, armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, imammedo@redhat.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com, afaerber@suse.de --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 16, 2014 at 10:19:33AM +0800, arei.gonglei@huawei.com wrote: > From: Gonglei >=20 > Normally, qmp_device_list_properties() may return NULL when > a device haven't special properties excpet Object and DeviceState > properties, such as virtio-balloon-device. >=20 > We just need check local_err instead of prop_list. >=20 > Example: >=20 > Segmentation fault (core dumped) >=20 > The backtrace as below: >=20 > Program received signal SIGSEGV, Segmentation fault. > 0x00005555559af1a8 in error_get_pretty (err=3D0x0) at util/error.c:152 > 152 return err->msg; > (gdb) bt > #0 0x00005555559af1a8 in error_get_pretty (err=3D0x0) at util/error.c:152 > #1 0x000055555572fce9 in qdev_device_help (opts=3D0x5555562fdfe0) at qde= v-monitor.c:210 > #2 0x000055555574a6f2 in device_help_func (opts=3D0x5555562fdfe0, opaque= =3D0x0) at vl.c:2362 > #3 0x00005555559c0a33 in qemu_opts_foreach (list=3D0x555555dd0b40 ,=20 > func=3D0x55555574a6ca , opaque=3D0x0, abort_on_fail= ure=3D0) at util/qemu-option.c:1072 > #4 0x000055555574f514 in main (argc=3D3, argv=3D0x7fffffffe218, envp=3D0= x7fffffffe238) at vl.c:4246 >=20 > Signed-off-by: Gonglei > --- > qdev-monitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUGBAoAAoJEJykq7OBq3PITJsIAJhWhIHy5txXFUAi4O93Nsgo zeNYFe4JytHHo5oGACr3cbTV3GDc78IpHKTzRNUGcBy8HWvzU3Ac2F+/a6ltAbFZ 9LgIbIH3TjG/R1lP73AOdXC+pPK1nHTeyu3OcESUHtkIdI9HqHjwZu9F9Uo6fnS4 jKMukDeij9Tqmnp/vj+c+tBX8biKXEeAf7W+fRPmI+mB84J2JPTprbI0UMFtjUi8 jMFnOwCtDPwwTmciSX/Mv/tKN6rmAwY9GTN5JJSrLgmD5nEhkJsAYTEqqvPYSO31 rGvztW0b5IriHwbaAwZ4oui+KoOmtghndScVMYjtknSJ7TgaeoeH48Cs+JnDAVI= =+WPJ -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--