Re: [PATCH v2 5/5] irqchip/gic-v3-its: Free the page when gen_pool_add() fails

From: Zenghui Yu

Date: Mon Nov 23 2026 - 07:41:26 EST


On 2026/11/17 3:29, Fuad Tabba wrote:
> When the ITT pool has no room, itt_alloc_pool() grows it by a page and
> retries. gen_pool_add() fails when it cannot allocate its chunk
> descriptor, but its return is ignored, so the page is leaked and the
> retry allocates another page to leak, until an add succeeds or a page
> allocation fails.
>
> Free the page and fail the allocation instead.
>
> Fixes: b08e2f42e86b5 ("irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor")
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
> Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Zenghui Yu <yuzenghui@xxxxxxxxxx>