qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] monitor: move json init from OPEN event to init


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] monitor: move json init from OPEN event to init
Date: Thu, 23 Aug 2012 14:42:00 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 23, 2012 at 08:22:35AM -0500, Anthony Liguori wrote:
> At some point in the past, the OPEN event was changed to be issued from a
> bottom half.  This creates a small window whereas a data callback registered 
> in
> init may be invoked before the OPEN event has been issued.
> 
> This is reproducible with:
> 
>  echo "{'execute': 'qmp_capabilities'}" | qemu-system-x86_64 -M none -qmp 
> stdio
> 
> We can fix this for the monitor by moving the parser initialization to init.
> 
> The remaining state that is set in OPEN appears harmless.
> 
> Reported-by: Daniel Berrange <address@hidden>
> Signed-off-by: Anthony Liguori <address@hidden>

Signed-off-by: Daniel P. Berrange <address@hidden>

Works in my testing. I have also fixed libvirt so that it does not try
to send commands to QMP, until QMP has sent out its initial greeting,
thus avoiding the flaw too.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]