qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] monitor: move json init from OPEN event to init
Date: Thu, 23 Aug 2012 14:42:00 +0100	[thread overview]
Message-ID: <20120823134200.GH10833@redhat.com> (raw)
In-Reply-To: <1345728155-11667-1-git-send-email-aliguori@us.ibm.com>

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 <berrange@redhat.com>
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>

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	other threads:[~2012-08-23 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 13:22 [Qemu-devel] [PATCH] monitor: move json init from OPEN event to init Anthony Liguori
2012-08-23 13:42 ` Daniel P. Berrange [this message]
2012-08-23 22:06 ` Max Filippov
2012-08-23 22:18   ` Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120823134200.GH10833@redhat.com \
    --to=berrange@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).