From: "Jan Beulich" Subject: Re: [PATCH] xen: don't leak IRQs over suspend/resume. Date: Wed, 02 Dec 2009 08:47:54 +0000 Message-ID: <4B1637CA0200007800022FB5@vpn.id2.novell.com> References: <1259684130-20855-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1259684130-20855-1-git-send-email-ian.campbell@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Ian Campbell 01.12.09 17:15 >>> >On resume irq_info[*].evtchn is reset to 0 since event channel mappings = are not >preserved over suspend/resume. The other contents of irq_info is = preserved to >allow rebind_evtchn_irq() to function. > >However when a device resumes it will try to unbind from the previous IRQ = (e.g. >blkfront goes blkfront_resume() -> blkif_free() -> unbind_from_irqhandler(= ) -> >unbind_from_irq()). This will fail due to the check for VALID_EVTCHN in >unbind_from_irq() and the IRQ is leaked. The device will then continue to >resume and allocate a new IRQ, eventually leading to find_unbound_irq() >panic()ing. > >Fix this by changing unbind_from_irq() to handle teardown of interrupts = which >have type!=3DIRQT_UNBOUND but are not currently bound to a specific event >channel. This seems applicable to the 2.6.18/.27 trees too, doesn't it? Jan=20