On Fri, 2019-07-12 at 18:20 +1000, Alexey Kardashevskiy wrote:
> 
> diff --git a/arch/powerpc/sysdev/xive/common.c 
> b/arch/powerpc/sysdev/xive/common.c
> index 082c7e1c20f0..65742e280337 100644
> --- a/arch/powerpc/sysdev/xive/common.c
> +++ b/arch/powerpc/sysdev/xive/common.c
> @@ -148,8 +148,12 @@ static u32 xive_scan_interrupts(struct xive_cpu *xc, 
> bool just_peek)
>               irq = xive_read_eq(&xc->queue[prio], just_peek);
>  
>               /* Found something ? That's it */
> -             if (irq)
> -                     break;
> +             if (irq) {
> +                     /* Another CPU may have shut this irq down, check it */
> +                     if (irq_to_desc(irq))

What if it gets deregistered here .... ?

> +                             break;
> +                     irq = 0;
> +             }
>  
>               /* Clear pending bits */
>               xc->pending_prio &= ~(1 << prio);

Wouldn't it be better to check the return value from generic_handle_irq
instead ?

Cheers,
Ben.


Reply via email to