All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: xen-devel@lists.xensource.com
Subject: Re: PATCH: 1/4: QEMU event handler bug fix
Date: Mon, 29 Oct 2007 21:51:07 +0000	[thread overview]
Message-ID: <20071029215107.GH1053@redhat.com> (raw)
In-Reply-To: <20071029214858.GG1053@redhat.com>

This patch pulls in an upstream QEMU fix for dealing with a problem in the event
dispatcher where a write callback gets unregistered while a write event is pending
from poll. WIthout this the QEMU process with deference a NULL pointer & crash

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


Dan.

diff -rup xen-3.1.0-src.orig/tools/ioemu/vl.c xen-3.1.0-src.new/tools/ioemu/vl.c
--- xen-3.1.0-src.orig/tools/ioemu/vl.c	2007-08-28 16:43:11.000000000 -0400
+++ xen-3.1.0-src.new/tools/ioemu/vl.c	2007-08-28 16:43:50.000000000 -0400
@@ -5217,12 +5217,10 @@ void main_loop_wait(int timeout)
         IOHandlerRecord **pioh;
 
         for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next) {
-            if (ioh->deleted)
-                continue;
-            if (ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
+            if (!ioh->deleted && ioh->fd_read && FD_ISSET(ioh->fd, &rfds)) {
                 ioh->fd_read(ioh->opaque);
             }
-            if (ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) {
+            if (!ioh->deleted && ioh->fd_write && FD_ISSET(ioh->fd, &wfds)) {
                 ioh->fd_write(ioh->opaque);
             }
         }


-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

  reply	other threads:[~2007-10-29 21:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 21:48 PATCH: 0/4: TLS encryption and x509 authentication for VNC Daniel P. Berrange
2007-10-29 21:51 ` Daniel P. Berrange [this message]
2007-10-29 21:51 ` PATCH: 2/4: Revert current VNC auth support Daniel P. Berrange
2007-10-29 21:52 ` PATCH: 3/4: Add VNC auth support from upstream QEMU Daniel P. Berrange
2007-10-30  7:53   ` Pasi Kärkkäinen
2007-10-30 13:31     ` Daniel P. Berrange
2007-10-29 21:53 ` PATCH: 4/4: XenD config for VNC TLS protocol Daniel P. Berrange

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=20071029215107.GH1053@redhat.com \
    --to=berrange@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.