Merge tag 'irq_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Borislav Petkov:

- Cleanup the firmware node for the new IRQ MSI domain properly, to
avoid leaking memory

* tag 'irq_urgent_for_v6.2_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq/msi: Free the fwnode created by msi_create_device_irq_domain()

Changed files
+6 -2
kernel
+1 -1
kernel/irq/irqdomain.c
··· 114 114 { 115 115 struct irqchip_fwid *fwid; 116 116 117 - if (WARN_ON(!is_fwnode_irqchip(fwnode))) 117 + if (!fwnode || WARN_ON(!is_fwnode_irqchip(fwnode))) 118 118 return; 119 119 120 120 fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
+5 -1
kernel/irq/msi.c
··· 1000 1000 fail: 1001 1001 msi_unlock_descs(dev); 1002 1002 free_fwnode: 1003 - kfree(fwnode); 1003 + irq_domain_free_fwnode(fwnode); 1004 1004 free_bundle: 1005 1005 kfree(bundle); 1006 1006 return false; ··· 1013 1013 */ 1014 1014 void msi_remove_device_irq_domain(struct device *dev, unsigned int domid) 1015 1015 { 1016 + struct fwnode_handle *fwnode = NULL; 1016 1017 struct msi_domain_info *info; 1017 1018 struct irq_domain *domain; 1018 1019 ··· 1026 1025 1027 1026 dev->msi.data->__domains[domid].domain = NULL; 1028 1027 info = domain->host_data; 1028 + if (irq_domain_is_msi_device(domain)) 1029 + fwnode = domain->fwnode; 1029 1030 irq_domain_remove(domain); 1031 + irq_domain_free_fwnode(fwnode); 1030 1032 kfree(container_of(info, struct msi_domain_template, info)); 1031 1033 1032 1034 unlock: