Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] Check whether dom is NULL when we handle a watch. This m

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Check whether dom is NULL when we handle a watch. This might occur if the
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Oct 2005 13:46:11 +0000
Delivery-date: Wed, 26 Oct 2005 13:44:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID a39aee6d660f96353fbe3e508ce0ed36515b79bb
# Parent  9b91f6583b5ea7d5b2f0033fd3351a54813163c8
Check whether dom is NULL when we handle a watch.  This might occur if the
domain has recently been removed from our list, but with a watch still in
flight.  This should fix the intermittent crash in xenconsoled that is plaguing
us at the moment.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 9b91f6583b5e -r a39aee6d660f tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Oct 26 11:06:58 2005
+++ b/tools/console/daemon/io.c Wed Oct 26 12:41:00 2005
@@ -512,7 +512,9 @@
                enum_domains();
        else if (sscanf(vec[XS_WATCH_TOKEN], "dom%u", &domid) == 1) {
                dom = lookup_domain(domid);
-               if (dom->is_dead == false)
+               /* We may get watches firing for domains that have recently
+                  been removed, so dom may be NULL here. */
+               if (dom && dom->is_dead == false)
                        domain_create_ring(dom);
        }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Check whether dom is NULL when we handle a watch. This might occur if the, Xen patchbot -unstable <=