Re: [PATCH v4 08/48] KVM: arm64: gic-v5: Add VPE doorbell domain

Sascha Bischoff <[email protected]>
Newsgroups dev.linux.lists.kvmarm,dev.linux.lists.sashiko-reviews,org.kernel.vger.kvm
Message-ID <[email protected]>
On Fri, 2026-07-24 at 11:11 +0000, [email protected] wrote:
> > +static void vgic_v5_teardown_per_vm_domain(struct vgic_v5_vm *vm)
> > +{
> > +	if (!vm->domain)
> > +		return;
> > +
> 
> [Severity: High]
> Does this code leak the allocated doorbell IRQs and their request
> handlers?
> 
> During initialization, vgic_v5_create_per_vm_domain() allocates IRQs
> via
> irq_domain_alloc_irqs(), and vgic_v5_init() requests them via
> request_irq().
> 
> Should free_irq() and irq_domain_free_irqs() be called before tearing
> down the domain? 

Yes, it should do irq_domain_free_irqs(). It was missing in this
commit, but is handled in a future commit. I've updated this commit to
call irq_domain_free_irqs().

> Removing a domain that still has allocated IRQs can trigger a
> warning in the core IRQ subsystem, and repeatedly creating and
> destroying
> VMs could eventually exhaust the IRQ descriptor space.

Thanks,
Sascha
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.