Re: [PATCH 2/2] genirq: proc: fix a procfs entry leak

From: Thomas Gleixner
Date: Fri Aug 25 2023 - 10:59:38 EST


On Fri, Aug 25 2023 at 13:01, Bartosz Golaszewski wrote:
> On Fri, Aug 25, 2023 at 10:11 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> I was under the impression that the whole irqnum-to-irq_desc mapping
> was designed to handle this situation on purpose, hence a check for
> !desc and a silent return in free_irq(). If a missing mapping was a
> bug, then it would warrant at least a warning, right?

The check for !desc has nothing to do with the problem you are trying to
solve. There is obviously a valid interrupt descriptor so desc != NULL,
otherwise there would be no procfs entries and no actions, no?

Thanks,

tglx