From: Keir Fraser Subject: Re: Regression introduced by changeset "evtchn: Freepirq_to_evtchn/pirq_mask arrays on domain destruction." Date: Fri, 29 May 2009 09:11:41 +0100 Message-ID: References: <4A1FA8AD02000078000033AF@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4A1FA8AD02000078000033AF@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Simon Horman Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 29/05/2009 08:19, "Jan Beulich" wrote: > Yeah, evtchn_destroy() runs much earlier than arch_domain_destroy(). > > Keir, is there any reason evtchn_destroy() cannot be deferred accordingly? > If there is, then un-tying the freeing of pirq_mask and/or pirq_to_evtchn > from evtchn_destroy() would be needed. I have to admit that it seems not > logical even in the original code to have IRQ (and hence indirectly evtchn) > related activities going on for a domain past evtchn_destroy(). There are subtleties which make it a bad idea to defer evtchn_destroy() to complete_domain_destroy(). Changeset 15465 actually deliberately moved evtchn_destroy() earlier, and that cleaned up some issues. Moving the xfree()s to complete_domain_destryoy was my plan B in this case. -- Keir