[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240322023810.62914-1-huangguanrui.hgr@alibaba-inc.com>
Date: Fri, 22 Mar 2024 10:38:10 +0800
From: "huangguanrui.hgr" <huangguanrui.hgr@...baba-inc.com>
To: yuzenghui@...wei.com
Cc: linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
maz@...nel.org,
shannon.zhao@...ux.alibaba.com,
tglx@...utronix.de
Subject: Re: [PATCH] irqchip/gic-v3-its: Fix double free on error
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
Powered by blists - more mailing lists