WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] The following patch fixes a bug where xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] The following patch fixes a bug where xenconsoled will can SEGV
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Aug 2006 12:40:15 +0000
Delivery-date: Mon, 28 Aug 2006 05:40:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxxx
# Node ID c61b8296b39a261dc407e9585f666cffd4064198
# Parent  439fa5d6c5ce5d64921cd1923eecdae40967d6e9
The following patch fixes a bug where xenconsoled will can SEGV
because it uses FD_ISSET(-1,xxx).  Since the code is written that any
ring/tty handler can set d->tty_fd to -1 it has to be checked
_every_time_.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 tools/console/daemon/io.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff -r 439fa5d6c5ce -r c61b8296b39a tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Mon Aug 28 12:49:14 2006 +0100
+++ b/tools/console/daemon/io.c Mon Aug 28 12:50:55 2006 +0100
@@ -584,16 +584,14 @@ void handle_io(void)
                            FD_ISSET(xc_evtchn_fd(d->xce_handle), &readfds))
                                handle_ring_read(d);
 
-                       if (d->tty_fd != -1) {
-                               if (FD_ISSET(d->tty_fd, &readfds))
-                                       handle_tty_read(d);
-
-                               if (FD_ISSET(d->tty_fd, &writefds))
-                                       handle_tty_write(d);
-
-                               if (d->is_dead)
-                                       cleanup_domain(d);
-                       }
+                       if (d->tty_fd != -1 && FD_ISSET(d->tty_fd, &readfds))
+                               handle_tty_read(d);
+
+                       if (d->tty_fd != -1 && FD_ISSET(d->tty_fd, &writefds))
+                               handle_tty_write(d);
+
+                       if (d->is_dead)
+                               cleanup_domain(d);
                }
        } while (ret > -1);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] The following patch fixes a bug where xenconsoled will can SEGV, Xen patchbot-unstable <=