[PATCH v3 12/14] irqchip/gic-v5: Retain the ITT when device invalidation times out

Fuad Tabba fuad.tabba at linux.dev
Thu Nov 19 04:07:23 PST 2026


On Thu, 19 Nov 2026 10:28:19 +0000, Lorenzo Pieralisi
<lpieralisi at kernel.org> wrote:
[...]
>> diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
[...]
>> @@ -570,7 +570,9 @@ static int gicv5_its_device_unregister(struct gicv5_its_chip_data *its,
>>          its_write_table_entry(its, dte, 0);
>>
>>          ret = gicv5_its_device_cache_inv(its, its_dev);
>> -        gicv5_its_free_itt(its_dev);
>> +        /* Only release the ITT once the ITS has discarded its references. */
>> +        if (!ret)
>> +                gicv5_its_free_itt(its_dev);
>
>         if (ret)
>                 return ret;
>
>         gicv5_its_free_itt(its_dev);
>
>         return 0;

In this error path and the one in gicv5_its_device_register(),
kmemleak will report the retained ITT once the caller frees its_dev.
Could you mark the ITT allocations with kmemleak_not_leak() on both
paths, l2ptrs included for a two-level ITT?

With that added:
Reviewed-by: Fuad Tabba <fuad.tabba at linux.dev>

Cheers,
/fuad



More information about the linux-arm-kernel mailing list