Re: [PATCH] irqchip/atmel-aic: Fix potential deadlock in ->xlate()

From: Marc Zyngier
Date: Tue Sep 13 2016 - 06:28:33 EST


On 13/09/16 11:10, Boris Brezillon wrote:
> aic5_irq_domain_xlate() and aic_irq_domain_xlate() take the generic chip
> lock without disabling interrupts, which can lead to a deadlock if an
> interrupt occurs while the lock is held in one of these functions.
>
> Replace irq_gc_{lock,unlock}() calls by
> raw_spin_{lock_irqsave,unlock_irqrestore}() ones to prevent this bug from
> happening.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxxxxxxx>
> Fixes: b1479ebb7720 ("irqchip: atmel-aic: Add atmel AIC/AIC5 drivers")
> Cc: <stable@xxxxxxxxxxxxxxx>
> ---
> drivers/irqchip/irq-atmel-aic.c | 5 +++--
> drivers/irqchip/irq-atmel-aic5.c | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)

Acked-by: Marc Zyngier <marc.zyngier@xxxxxxx>

Thomas, any chance you could queue this one as a fix for 4.8-rc7?

Thanks,

M.
--
Jazz is not dead. It just smells funny...