From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkYSm-0003vr-UA for qemu-devel@nongnu.org; Tue, 21 Apr 2015 09:43:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkYSj-0004No-39 for qemu-devel@nongnu.org; Tue, 21 Apr 2015 09:43:44 -0400 Date: Tue, 21 Apr 2015 15:43:35 +0200 From: Kevin Wolf Message-ID: <20150421134335.GH3835@noname.str.redhat.com> References: <1429271563-3765-1-git-send-email-berto@igalia.com> <20150421132801.GE16345@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CUfgB8w4ZwR/yMy5" Content-Disposition: inline In-Reply-To: <20150421132801.GE16345@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] qmp: fill in the image field in BlockDeviceInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-block@nongnu.org, Alberto Garcia , qemu-devel@nongnu.org, Stefan Hajnoczi --CUfgB8w4ZwR/yMy5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 21.04.2015 um 15:28 hat Stefan Hajnoczi geschrieben: > On Fri, Apr 17, 2015 at 02:52:43PM +0300, Alberto Garcia wrote: > > The image field in BlockDeviceInfo is supposed to contain an ImageInfo > > object. However that is being filled in by bdrv_query_info(), not by > > bdrv_block_device_info(), which is where BlockDeviceInfo is actually > > created. > >=20 > > Anyone calling bdrv_block_device_info() directly will get a null image > > field. As a consequence of this, the HMP command 'info block -n -v' > > crashes QEMU. > >=20 > > This patch moves the code that fills in that field from > > bdrv_query_info() to bdrv_block_device_info(). > >=20 > > Signed-off-by: Alberto Garcia > > --- > > block.c | 9 +++++++-- > > block/qapi.c | 46 +++++++++++++++++++++++++------------------= --- > > blockdev.c | 2 +- > > include/block/block.h | 2 +- > > include/block/qapi.h | 2 +- > > 5 files changed, 35 insertions(+), 26 deletions(-) >=20 > For the record, the following patch has been merged instead: > [PATCH for-2.3] hmp: fix crash in 'info block -n -v' That was just a minimal stopgap solution that could still be applied after -rc3. We should revert it in block-next and apply this one as a replacement (after proper review, of course). Kevin --CUfgB8w4ZwR/yMy5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJVNlQHAAoJEH8JsnLIjy/WKOUP+gKgSxcxCVifjycMuI/k/5B8 YD5SmGUaF248icSEM1JZRJlB8XrEbkjSfXzlU3C6wFZ7rTgv336UhCItd4Bs1B36 oSxs0Zmhe6I6ysVHWvLoScXDQXiBvZvnGvPehjL4VwN7bVIv/VtD4no1Y4mf/Hev 5zoABp/jd0iKvyvaTLyOHIGpFjsV9WQAMnzJq9sCkdMIpUITU36I+MQz2SeHhbHd hrTVIkXrH8IiaZIbGyN306poCvTDoEejHOWwpDdSfm+xxxRdjZHleW03gT+rbqau 2j5mo7/hrOSPl9cU8+NqTjPuutQDiKkRNiww3NBrgDXR7HORgZso8z72xkYn8iOv MFpf7rrIyqkfXCnciBv090cHVciM57IiJN0qewsVP4vBkSpYT3H1oryzTJ+GS+TB usb5Pl7nvRyHprKtBAxqOIzNcQ5xnkOTvlN7UMo0Uhx+Iszfj+bixtI/QDKJjRt6 Oh4RlDvzTucVNCoNLjScFNVlsp8m0gW8DQWXW89P3EoYjGz07V7kdqMDKEQHBeZT 5pMR1pZFkS9bXVhYQgk6nn8p/jWcyZnPZAF86j2TZQJZamjWPg4PdFXMddDEE9Q6 4V2SCPJRj2Zu+WxDDZDUxDlpRgQk4vpfO689GMvjtyBNkHRa5lU/aMN0Ppqf1DEt 534TqUgKWR35xo27oOVZ =xVVp -----END PGP SIGNATURE----- --CUfgB8w4ZwR/yMy5--