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

Zenghui Yu yuzenghui at huawei.com
Mon Nov 23 04:41:16 PST 2026


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 at arm.com>
> Signed-off-by: Fuad Tabba <fuad.tabba at linux.dev>
> ---
>  drivers/irqchip/irq-gic-v3-its.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Zenghui Yu <yuzenghui at huawei.com>



More information about the linux-arm-kernel mailing list