[PATCH] PCI: rockchip-dw: Fix potential stale INTx handler on probe failure
Shawn Lin
shawn.lin at rock-chips.com
Tue Dec 1 05:05:51 PST 2026
在 2026/12/01 星期二 20:29, Guangshuo Li 写道:
> If host initialization fails, probe cleanup releases the Rockchip
> controller but leaves the chained INTx handler and its domain
> registered. Both retain pointers to the freed controller.
>
> Clear the chained handler and remove the unused domain before returning
> the host initialization error.
>
Reviewed-by: Shawn Lin <shawn.lin at rock-chips.com>
> This issue was found by our static analysis tool under development.
>
> Fixes: e8aae154df61 ("PCI: rockchip-dwc: Add legacy interrupt support")
> Signed-off-by: Guangshuo Li <liguangshuo at mail.sdu.edu.cn>
> ---
> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index ab2e26699409..138f69d0a18c 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -736,6 +736,8 @@ static int rockchip_pcie_configure_rc(struct platform_device *pdev,
> ret = dw_pcie_host_init(pp);
> if (ret) {
> dev_err(dev, "failed to initialize host\n");
> + irq_set_chained_handler_and_data(irq, NULL, NULL);
> + irq_domain_remove(rockchip->irq_domain);
> return ret;
> }
>
>
> base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
>
>
More information about the Linux-rockchip
mailing list