From: "Jan Beulich" Subject: Re: [PATCH v7 for-xen-4.5 1/2] dpci: Move from an hvm_irq_dpci (and struct domain) to an hvm_dirq_dpci model. Date: Mon, 29 Sep 2014 12:52:19 +0100 Message-ID: <54296413020000780003A74C@mail.emea.novell.com> References: <1411781587-20091-1-git-send-email-konrad.wilk@oracle.com> <1411781587-20091-2-git-send-email-konrad.wilk@oracle.com> <54293168.1070105@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XYZVA-0003lm-Uk for xen-devel@lists.xenproject.org; Mon, 29 Sep 2014 11:52:25 +0000 In-Reply-To: <54293168.1070105@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org, keir@xen.org, ian.jackson@eu.citrix.com, ian.campbell@citrix.com, tim@xen.org List-Id: xen-devel@lists.xenproject.org >>> On 29.09.14 at 12:16, wrote: > On 27/09/14 02:33, Konrad Rzeszutek Wilk wrote: >> @@ -526,13 +561,17 @@ static int _hvm_dirq_assist(struct domain *d, struct hvm_pirq_dpci *pirq_dpci, >> send_guest_pirq(d, pirq); >> >> if ( pirq_dpci->flags & HVM_IRQ_DPCI_GUEST_MSI ) >> - return 0; >> + { >> + spin_unlock(&d->event_lock); >> + return; >> + } > > perhaps "goto out_unlock;" ? It would help identify any return > statements as bogus while the lock is held. I know there are differing opinions on the use of goto in situations like this, but I'm rather happy that Konrad went the goto-free route. Jan