Re: [patch v2 06/14] genirq: Cache the condition for /proc/interrupts exposure

From: Thomas Gleixner

Date: Tue Mar 24 2026 - 16:34:43 EST


On Mon, Mar 23 2026 at 16:58, Radu Rendec wrote:
>> +void irq_proc_update_valid(struct irq_desc *desc)
>> +{
>> + u32 set = _IRQ_PROC_VALID;
>> +
>> + if (irq_settings_is_hidden(desc) || !desc->action ||
>> +     irq_desc_is_chained(desc) || !desc->kstat_irqs)
>
> Can desc->kstat_irqs ever be NULL? Looking at kernel/irq/irqdesc.c, it
> seems to me that it's allocated always and very early (before every
> other field in struct irq_desc), and with an explicit check for NULL on
> allocation. It's also deallocated late, right before struct irq_desc
> itself is deallocated (in irq_kobj_release()).

Well spotted. That's a left over from histerical code.