[PATCH] irqchip/gic-v3-its: Fix double free on error

Zenghui Yu yuzenghui at huawei.com
Tue Mar 26 02:43:39 PDT 2024


On 2024/3/22 10:38, huangguanrui.hgr wrote:
> 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.

They *should* point to the same its_vm structure.

> Will these two values be different? For example, when other bugs occur?

Of course they can be different if there are *bugs* but I guess you
won't get any further (e.g., you hit BUG_ON(vm != vpe->its_vm) in
its_vpe_irq_domain_free()). The right thing to do is fixing the bug
rather than papering over it.

Zenghui



More information about the linux-arm-kernel mailing list