[libvirt] [PATCH v2] qemu: Fix crash in virDomainMemoryStats with old qemu
Jiri Denemark
jdenemar at redhat.com
Thu Feb 6 10:38:49 UTC 2014
On Wed, Feb 05, 2014 at 15:12:03 -0700, Eric Blake wrote:
> On 02/05/2014 07:58 AM, John Ferlan wrote:
> >
> >
> > On 02/05/2014 08:19 AM, Jiri Denemark wrote:
> >> If virDomainMemoryStats was run on a domain with virtio balloon driver
> >> running on an old qemu which supports QMP but does not support qom-list
> >> QMP command, libvirtd would crash. The reason is we did not check if
> >> qemuMonitorJSONGetObjectListPaths failed and moreover we even stored its
> >> result in an unsigned integer type.
> >>
> >> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> >> ---
> >>
> >> Notes:
> >> version 2:
> >> - use signed type for i and j to avoid comparison between signed and
> >> unsigned types; gcc-- for not complaining about it
...
> I see no problem with returning -1 if qom-list doesn't exist. I'm happy
> with the patch as-is:
>
> ACK.
Thanks and pushed.
Jirka
More information about the libvir-list
mailing list