David! On Mon, Jan 16 2023 at 09:56, David Woodhouse wrote: > On Fri, 2022-11-25 at 00:24 +0100, Thomas Gleixner wrote: >> + >> + if (ops->domain_free_irqs) >> + ops->domain_free_irqs(domain, dev); > > Do you want a call to msi_free_dev_descs(dev) here? In the case where > the core code calls ops->domain_alloc_irqs() it *has* allocated the > descriptors first... but it's expecting the irqdomain to free them? No. Let me stare at it. > However, it's not quite as simple as adding msi_free_dev_descs()... Correct. > diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c > index 955267bbc2be..812e1ec1a633 100644 > --- a/kernel/irq/msi.c > +++ b/kernel/irq/msi.c > @@ -1533,9 +1533,10 @@ static void msi_domain_free_locked(struct device *dev, struct msi_ctrl *ctrl) > info = domain->host_data; > ops = info->ops; > > - if (ops->domain_free_irqs) > + if (ops->domain_free_irqs) { > ops->domain_free_irqs(domain, dev); > - else > + msi_free_msi_descs(dev); This is just wrong. I need to taxi my grandson. Will have a look afterwards. Thanks, tglx