WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH 12/14] xen: events: remove use of nr_irqs as

To: Josip Rodin <joy@xxxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH 12/14] xen: events: remove use of nr_irqs as upper bound on number of pirqs
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Mon, 14 Mar 2011 09:50:39 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 14 Mar 2011 02:51:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110312234129.GA20505@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <20110312234129.GA20505@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2011-03-12 at 23:41 +0000, Josip Rodin wrote:
> On Sun, Mar 13, 2011 at 12:31:52AM +0100, joy wrote:
> > Hi,
> > 
> > I figure lockdep is going to tell you the same, but I happened to
> > notice it myself:
> > 
> > http://xenbits.xen.org/gitweb/?p=people/ianc/linux-2.6.git;a=commitdiff;h=88d0448802e4720579e28ffc7e6db8652e378274
> > 
> > @@ -769,7 +748,24 @@ out:
> > 
> >  int xen_irq_from_pirq(unsigned pirq)
> > [...]
> > +       spin_lock(&irq_mapping_update_lock);
> > [...]
> > +out:
> > +       spin_lock(&irq_mapping_update_lock);
> > 
> > The latter one looks like it should be an unlock.
> 
> I just noticed that it's been pulled into
> http://git.kernel.org/?p=linux/kernel/git/konrad/xen.git;a=commitdiff;h=69c358ce377e998e3ababb494c2f8769dfb1715d
> and mentioned in
> http://lists.xensource.com/archives/html/xen-devel/2011-03/msg00718.html
> So I'm sending it to the list (with adjusted Subject and In-Reply-To)
> just in case.

Thanks. I could've sworn I fixed this up once already but I guess I
managed to not include it in the final branch somehow.

8<-------------------------------------
>From cc02eff5c1ed405153a4fe146382ee0324ab8ce1 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 14 Mar 2011 09:50:01 +0000
Subject: [PATCH] xen: events: correct locking in xen_irq_from_pirq

One of those spin_lock() calls should be an unlock...

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 drivers/xen/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 3566c00..dc81779 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -752,7 +752,7 @@ int xen_irq_from_pirq(unsigned pirq)
        }
        irq = -1;
 out:
-       spin_lock(&irq_mapping_update_lock);
+       spin_unlock(&irq_mapping_update_lock);
 
        return irq;
 }
-- 
1.5.6.5




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>