[PATCH] irqchip/gic-v3-its: Fix double free on error
huangguanrui.hgr
huangguanrui.hgr at alibaba-inc.com
Thu Mar 21 19:38:10 PDT 2024
We notice that:
In its_vpe_irq_domain_alloc, its_vm is from args, But in its_vpe_irq_domain_free,
its_vm is from domain->host_data.
Will these two values be different? For example, when other bugs occur?
If these two values is different, I think we can't handle these 2 cases together.
if (err)
its_vpe_irq_domain_free(domain, virq, i);
Because these will lead a memleak.
So I think that check the bitmap is a safe way to fix this. If bitmap is empty, that means
its_vpe_irq_domain_free handles same its_vm which comes from its_vpe_irq_domain_alloc.
Thanks,
Guanrui
More information about the linux-arm-kernel
mailing list