[PATCH] PCI: rockchip-ep: disable link training work on remove

Manivannan Sadhasivam mani at kernel.org
Mon Aug 10 22:52:34 PDT 2026


On Tue, Aug 11, 2026 at 02:53:15AM +0000, Fan Wu wrote:
> The endpoint driver has no .remove callback, so on unbind the
> link_training work can keep running after the devm-allocated ep is freed,
> causing a use-after-free.  Add a .remove() callback that disables the
> worker.
> 
> This issue was found by an in-house static analysis tool.
> 
> Fixes: bd6e61df4b2e ("PCI: rockchip-ep: Improve link training")
> Cc: stable at vger.kernel.org
> Assisted-by: Codex:gpt-5.6

This LLM tool should've told you that you cannot remove a
builtin_platform_driver(). So this patch is essentially adding dead code. So
NACK.

- Mani

-- 
மணிவண்ணன் சதாசிவம்



More information about the linux-arm-kernel mailing list