mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
PCI: xilinx: Fix INTx IRQ domain leak in error paths
[ Upstream commitf42b3c053b] In xilinx_pcie_init_irq_domain(), if xilinx_allocate_msi_domains() fails after pcie->leg_domain has been successfully created via irq_domain_create_linear(), the function returns directly without cleaning up the allocated IRQ domain, resulting in a resource leak. In xilinx_free_msi_domains(), pcie->leg_domain is also neglected. Add irq_domain_remove() call in the error path to properly release the IRQ domain before returning the error. Also rename xilinx_free_msi_domains() to xilinx_free_irq_domains() and add the release of pcie->leg_domain to it. Fixes:313b64c3ae("PCI: xilinx: Convert to MSI domains") Suggested-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20251219021615.965-1-vulab@iscas.ac.cn Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
4e8e7080b5
commit
004288f3b2
1 changed files with 6 additions and 3 deletions
Loading…
Add table
Add a link
Reference in a new issue