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

[Xen-devel] Re: xenstored unsafe lock order detected, xlate_proc_name, e

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: xenstored unsafe lock order detected, xlate_proc_name, evtchn_ioctl, port_user_lock
From: Pasi Kärkkäinen <pasik@xxxxxx>
Date: Sun, 6 Jun 2010 21:54:01 +0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 06 Jun 2010 11:54:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C0BDDB0.3000501@xxxxxxxx>
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>
References: <20100606173355.GS17817@xxxxxxxxxxx> <4C0BDDB0.3000501@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
On Sun, Jun 06, 2010 at 10:41:04AM -0700, Jeremy Fitzhardinge wrote:
> On 06/06/2010 10:33 AM, Pasi Kärkkäinen wrote:
> > Hello,
> >
> > I just tried the latest xen/stable-2.6.32.x kernel, ie. 2.6.32.15, with Xen 
> > 4.0.0,
> > and I got this:
> >
> > http://pasik.reaktio.net/xen/pv_ops-dom0-debug/log-2.6.32.15-pvops-dom0-xen-stable-x86_64.txt
> >   
> 
> Does this help?
> 

It gave failing hunks so I had to manually apply it to 2.6.32.15, 
but it seems to fix that issue. No "unsafe lock order" messages anymore.

Thanks!

-- Pasi

> From 3f5e554f669098c84c82ce75e7577f7e0f3fccde Mon Sep 17 00:00:00 2001
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> Date: Fri, 28 May 2010 15:28:27 -0700
> Subject: [PATCH] xen/evtchn: don't do unbind_from_irqhandler under spinlock
> 
> unbind_from_irqhandler can end up doing /proc operations, which can't
> happen under a spinlock.  So before removing the IRQ handler,
> disable the irq under the port_user lock (masking the underlying event
> channel and making sure the irq handler isn't running concurrently and
> won't start running), then remove the handler without the lock.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> 
> diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
> index f79ac5c..6a3a129 100644
> --- a/drivers/xen/evtchn.c
> +++ b/drivers/xen/evtchn.c
> @@ -375,10 +375,12 @@ static long evtchn_ioctl(struct file *file,
>                       break;
>               }
>  
> -             evtchn_unbind_from_user(u, unbind.port);
> +             disable_irq(irq_from_evtchn(unbind.port));
>  
>               spin_unlock_irq(&port_user_lock);
>  
> +             evtchn_unbind_from_user(u, unbind.port);
> +
>               rc = 0;
>               break;
>       }
> @@ -484,11 +486,18 @@ static int evtchn_release(struct inode *inode, struct 
> file *filp)
>               if (get_port_user(i) != u)
>                       continue;
>  
> -             evtchn_unbind_from_user(get_port_user(i), i);
> +             disable_irq(irq_from_evtchn(i));
>       }
>  
>       spin_unlock_irq(&port_user_lock);
>  
> +     for (i = 0; i < NR_EVENT_CHANNELS; i++) {
> +             if (get_port_user(i) != u)
> +                     continue;
> +
> +             evtchn_unbind_from_user(get_port_user(i), i);
> +     }
> +
>       kfree(u->name);
>       kfree(u);
>  
> 
> 

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