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-devel

[Xen-devel] [PATCH] xenpaging: fix crash in notify_via_xen_event_channel

To: Patrick Colp <pjcolp@xxxxxxxxx>
Subject: [Xen-devel] [PATCH] xenpaging: fix crash in notify_via_xen_event_channel
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Wed, 15 Sep 2010 18:11:46 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 15 Sep 2010 09:12:41 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1284567108; l=742; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=oUi6v+GWTmClG3BAFeq7MqFfsC4=; b=xGTl4UdBlopQve8Z4vUwPLkqoaUCe94DZZWTaiDx7RExu/E7seTMGgTaEF0cir7bZyv cwP3h+YiEJRyQoSIiakLVSJCxjHbr+GiPUe2768yeE1ESl7vEadI6ikS2U/ejU/B0Ojc0 8b6X/cCmal9WfVgDQy+dzO8zEEwDF5QtOi0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100915160521.GA16644@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100915160521.GA16644@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Avoid crash of Xen if a xenpaging enabled guest crashes and there are still
memevents in flight, as reported here:

http://lists.xensource.com/archives/html/xen-devel/2010-08/msg00516.html

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 xen/common/event_channel.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- xen-unstable.hg-4.1.22132.orig/xen/common/event_channel.c
+++ xen-unstable.hg-4.1.22132/xen/common/event_channel.c
@@ -1030,6 +1030,12 @@ void notify_via_xen_event_channel(struct
 
     spin_lock(&ld->event_lock);
 
+    if ( unlikely(ld->is_dying) )
+    {
+        spin_unlock(&ld->event_lock);
+        return;
+    }
+
     ASSERT(port_is_valid(ld, lport));
     lchn = evtchn_from_port(ld, lport);
     ASSERT(lchn->consumer_is_xen);

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