Re: [PATCHv4] irqchip: arm-gic: take gic_lock when updating irq type

From: Marc Zyngier
Date: Wed Mar 28 2018 - 10:37:05 EST


On Wed, 28 Mar 2018 14:42:00 +0100,
Aniruddha Banerjee wrote:
>
> From: Aniruddha Banerjee <aniruddhab@xxxxxxxxxx>
>
> The kernel documentation states that the locking of the irq-chip
> registers should be handled by the irq-chip driver. In the irq-gic,
> the accesses to the irqchip are seemingly not protected and multiple
> writes to SPIs from different irq descriptors do RMW requests without
> taking the irq-chip lock. When multiple irqs call the request_irq at
> the same time, there can be a simultaneous write at the gic
> distributor, leading to a race. Acquire the gic_lock when the
> irq_type is updated.
>
> Cc: stable@xxxxxxxxxxxxxxx
>
> Signed-off-by: Aniruddha Banerjee <aniruddhab@xxxxxxxxxx>

I've applied this after having reworked the commit log a bit.

Thanks,

M.

--
Jazz is not dead, it just smell funny.