Re: [patch v2 09/14] genirq: Expose irq_find_desc_at_or_after() in core code

From: Thomas Gleixner

Date: Thu Mar 26 2026 - 17:11:24 EST


On Thu, Mar 26 2026 at 19:13, Dmitry Ilvokhin wrote:
>> -static unsigned int irq_find_at_or_after(unsigned int offset)
>> +struct irq_desc *irq_find_desc_at_or_after(unsigned int offset)
>> {
>> unsigned long index = offset;
>> - struct irq_desc *desc;
>> -
>> - guard(rcu)();
>
> Is the drop of guard(rcu)() intentional here? irq_get_next_irq()
> dereferences the returned pointer after mt_find() has dropped
> rcu_read_unlock(). Should it hold its own guard(rcu)() to keep the same
> behaviour as before?

Good catch. The caller of irq_find_at_or_after() needs to hold it.