xen/22159-notify-evtchn-dying.patch

28 lines
786 B
Diff
Raw Normal View History

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1284535133 -3600
# Node ID 62edd2611cbbe4c50574b6f6f73dda2ae1136dde
# Parent 869a0fdf8686c3dada14122df6d22a38705c2401
notify_via_xen_event_channel() should check for dying domain.
Else we can fail on either ASSERTion in that function.
From: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -994,6 +994,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);