All of lore.kernel.org
 help / color / mirror / Atom feed
* how to prevent crashes in notify_via_xen_event_channel during shutdown/crash
@ 2010-09-07 19:52 Olaf Hering
  2010-09-14 21:40 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2010-09-07 19:52 UTC (permalink / raw)
  To: xen-devel


Hello,

I'm seeing crashes with 4.0.1 in notify_via_xen_event_channel() after
evtchn_destroy() was already executed, the ASSERT triggers.
There are a few calls to notify_via_xen_event_channel(), only
hvm_send_assist_req() seems to check the domain->is_shutting_down flag.
xen-unstable is not much different in that area.

How should a check for an already destroyed eventchannel look like?
Maybe like its done in free_xen_event_channel()?

Olaf

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to prevent crashes in notify_via_xen_event_channel during shutdown/crash
  2010-09-07 19:52 how to prevent crashes in notify_via_xen_event_channel during shutdown/crash Olaf Hering
@ 2010-09-14 21:40 ` Olaf Hering
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Hering @ 2010-09-14 21:40 UTC (permalink / raw)
  To: xen-devel

On Tue, Sep 07, Olaf Hering wrote:

> 
> Hello,
> 
> I'm seeing crashes with 4.0.1 in notify_via_xen_event_channel() after
> evtchn_destroy() was already executed, the ASSERT triggers.
> There are a few calls to notify_via_xen_event_channel(), only
> hvm_send_assist_req() seems to check the domain->is_shutting_down flag.
> xen-unstable is not much different in that area.
> 
> How should a check for an already destroyed eventchannel look like?
> Maybe like its done in free_xen_event_channel()?

This patch fixes the crashes for me.


--- xen-4.0.1-testing.orig/xen/common/event_channel.c
+++ xen-4.0.1-testing/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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-14 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 19:52 how to prevent crashes in notify_via_xen_event_channel during shutdown/crash Olaf Hering
2010-09-14 21:40 ` Olaf Hering

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.