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

From: Manivannan Sadhasivam

Date: Tue Aug 11 2026 - 01:54:08 EST


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@xxxxxxxxxxxxxxx
> 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

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