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: Crash in __pirq_guest_eoi()

To: "Jeremy Fitzhardinge" <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: Crash in __pirq_guest_eoi()
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Mon, 06 Sep 2010 13:04:39 +0100
Cc: "Xen-devel@xxxxxxxxxxxxxxxxxxx" <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 06 Sep 2010 05:05:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C813F82.1090502@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: <4C813F82.1090502@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
 >>> On 03.09.10 at 20:33, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
> I'm seeing a crash in:
> 
> static void __pirq_guest_eoi(struct domain *d, int pirq)
> {
>     struct irq_desc         *desc;
>     irq_guest_action_t *action;
>     cpumask_t           cpu_eoi_map;
>     int                 irq;
> 
>     ASSERT(local_irq_is_enabled());
>     desc = domain_spin_lock_irq_desc(d, pirq, NULL);
>     if ( desc == NULL )
>         return;
> 
>     action = (irq_guest_action_t *)desc->action;
>     irq = desc - irq_desc;
> 
>     if ( action->ack_type == ACKTYPE_NONE )
>     {
> 
> where action is NULL.

Any more precise information on the conditions under which this
happens? Like trying to EOI a bad pirq?

> I'm playing around with the pvops kernel's handling of pirq interrupts,
> so the kernel is probably misbehaving, but it would be nice if Xen
> didn't keep crashing on me.
> 
> I guess this is the right fix/workaround?

No. You can't return without releasing the lock acquired a couple of
lines earlier. And it seems bogus in the first place that you could get
there and find action being NULL, so it'd seem to be a workaround
at best.

Jan

> diff -r d37dc6401a1f xen/arch/x86/irq.c
> --- a/xen/arch/x86/irq.c      Thu Sep 02 17:44:46 2010 +0100
> +++ b/xen/arch/x86/irq.c      Fri Sep 03 11:33:15 2010 -0700
> @@ -1028,6 +1028,9 @@
>      action = (irq_guest_action_t *)desc->action;
>      irq = desc - irq_desc;
>  
> +    if ( action == NULL )
> +     return;
> +
>      if ( action->ack_type == ACKTYPE_NONE )
>      {
>          ASSERT(!test_bit(pirq, d->pirq_mask));
> 
>     J




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

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