[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 18/18] xen/arm: IRQ: Handle multiple action per IRQ



On Tue, 2014-04-22 at 13:58 +0100, Julien Grall wrote:
> On ARM, it may happen (eg ARM SMMU) to setup multiple handler for the same
> interrupt.
> 
> To be able to use multiple action, the driver has to explicitly call
> {setup,request}_irq with IRQF_SHARED as 2nd parameter.
> 
> The behavior stays the same on x86, e.g only one action is handled.
> 
> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
> Cc: Keir Fraser <keir@xxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> 
> ---
>     Changes in v4:
>         - Go back to a single custom linked list. The double linked-list
>         doesn't fit the requirements (i.e browsing safely without look) and
>         the llist.h from Linux doesn't allow use to delete a node in the 
> middle
>         of the list.

Is this variant any safer?

> +        do
> +        {
> +            action->handler(irq, action->dev_id, regs);
> +            action = action->next;
> +        } while ( action );

What happens if action is freed and recycled in the midst of this loop?

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.