From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86/MSI: fix error handling Date: Wed, 25 Mar 2015 18:37:28 +0000 Message-ID: <55130068.7010308@citrix.com> References: <5512EF2F020000780006D8F3@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YaqBJ-0000TC-VK for xen-devel@lists.xenproject.org; Wed, 25 Mar 2015 18:37:34 +0000 In-Reply-To: <5512EF2F020000780006D8F3@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org On 25/03/15 16:23, Jan Beulich wrote: > __setup_msi_irq() needs to undo what it did before calling > write_msi_msg() in case that returned an error. > > map_domain_pirq() needs to get rid of the MSI descriptor it > (implicitly) allocated. The case of a setup_msi_irq() failure on a > non-initial multi-vector-MSI interrupt needs special handling: While > the initial IRQ will get freed by the caller (who also passed it to > us), we need to undo the effect setup_msi_irq() had on it. (As a > benefit from the added call to msi_free_irq() we no longer need to > explicitly call destroy_irq() on the non-initial slots.) > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper