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

From: Sascha Bischoff

Date: Wed Nov 25 2026 - 09:03:05 EST


On 19/11/2026 12:07, Fuad Tabba wrote:
On Thu, 19 Nov 2026 10:28:19 +0000, Lorenzo Pieralisi
<lpieralisi@xxxxxxxxxx> 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?

I've added these, thanks.


With that added:
Reviewed-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>

Cheers,
/fuad