mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
irqchip/irq-msi-lib: Free wired MSI descriptors
msi_device_domain_alloc_wired() allocates a descriptor for each
interrupt, but wired MSI domains do not set MSI_FLAG_FREE_MSI_DESCS.
msi_device_domain_free_wired() releases the IRQ without freeing its
descriptor, eventually exhausting the domain. Failed allocations also
leave descriptors behind.
Set MSI_FLAG_FREE_MSI_DESCS for wired MSI domains so both paths
release the descriptors.
Fixes: 64a8553243 ("irqchip/irq-msi-lib: Prepare for DOMAIN_BUS_WIRED_TO_MSI")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261025122058.2180685-1-thnkslprpt@gmail.com
This commit is contained in:
parent
a2f482407d
commit
1c16bc2b11
|
|
@ -75,6 +75,7 @@ bool msi_lib_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
|
|||
info->flags = MSI_FLAG_ALLOC_SIMPLE_MSI_DESCS | MSI_FLAG_FREE_MSI_DESCS;
|
||||
fallthrough;
|
||||
case DOMAIN_BUS_WIRED_TO_MSI:
|
||||
info->flags |= MSI_FLAG_FREE_MSI_DESCS;
|
||||
/* Remove PCI specific flags */
|
||||
required_flags &= ~MSI_FLAG_PCI_MSI_MASK_PARENT;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user