Re: [PATCH] genirq: Avoid race between cpu hot plug and irq_desc() allocation paths

From: Thomas Gleixner
Date: Wed Sep 05 2018 - 14:24:02 EST


On Wed, 5 Sep 2018, Prakruthi Deepak Heragu wrote:

> One of the cores might have just allocated irq_desc() and other core
> might be doing irq migration in the hot plug path. In the hot plug path
> during the IRQ migration, for_each_active_irq macro is trying to get
> irqs whose bits are set in allocated_irqs bit map but there is no return
> value check after irq_to_desc for desc validity.

Confused. All parts involved, irq allocation/deallocation and the CPU
hotplug code take sparse_irq_lock to prevent exavtly that.

Thanks,

tglx