[PATCH v2] PCI: mediatek: Fix IRQ domain leak when port fails to enable

Manivannan Sadhasivam manivannan.sadhasivam at oss.qualcomm.com
Tue Jun 9 09:50:26 PDT 2026


On Thu, 21 May 2026 23:16:17 +0530, Manivannan Sadhasivam wrote:
> When mtk_pcie_enable_port() fails, mtk_pcie_port_free() removes the port
> from pcie->ports and frees the port structure. However, the IRQ domains set
> up earlier by mtk_pcie_init_irq_domain() are never freed.
> 
> Fix this by refactoring mtk_pcie_irq_teardown() into a per-port helper,
> mtk_pcie_irq_teardown_port(), and calling it from mtk_pcie_setup() when
> mtk_pcie_enable_port() fails. Since the IRQ teardown must only happen in
> the probe error path (during resume, child devices may have active MSI
> mappings and the NOIRQ context prohibits sleeping locks),
> mtk_pcie_enable_port() is changed to return an error code so callers can
> distinguish the two paths and act accordingly.
> 
> [...]

Applied, thanks!

[1/1] PCI: mediatek: Fix IRQ domain leak when port fails to enable
      commit: f865a57896bd92d7662eb2818d8f48872e2cbbc7

Best regards,
-- 
Manivannan Sadhasivam <mani at kernel.org>




More information about the Linux-mediatek mailing list