From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: Re: how to prevent crashes in notify_via_xen_event_channel during shutdown/crash
Date: Tue, 14 Sep 2010 23:40:39 +0200 [thread overview]
Message-ID: <20100914214039.GA12522@aepfle.de> (raw)
In-Reply-To: <20100907195207.GA1428@aepfle.de>
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);
prev parent reply other threads:[~2010-09-14 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100914214039.GA12522@aepfle.de \
--to=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.