Re: [PATCH 2/5] EDAC/versalnet: Release reference to remoteproc device in remove
From: Borislav Petkov
Date: Sun Mar 22 2026 - 12:00:31 EST
On Sun, Mar 22, 2026 at 06:11:34AM -0700, Prasanna Kumar T S M wrote:
> The rproc reference acquired via rproc_get_by_phandle() during probe
> is not released in mc_remove(), causing a reference count leak. Add
> the missing rproc_put() call.
>
> Fixes: d5fe2fec6c40d ("EDAC: Add a driver for the AMD Versal NET DDR controller")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Prasanna Kumar T S M <ptsm@xxxxxxxxxxxxxxxxxxx>
> ---
> drivers/edac/versalnet_edac.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/edac/versalnet_edac.c b/drivers/edac/versalnet_edac.c
> index f70243bc8a7a..28f5036f381c 100644
> --- a/drivers/edac/versalnet_edac.c
> +++ b/drivers/edac/versalnet_edac.c
> @@ -958,6 +958,7 @@ static void mc_remove(struct platform_device *pdev)
> cdx_mcdi_finish(priv->mcdi);
> unregister_rpmsg_driver(&amd_rpmsg_driver);
> rproc_shutdown(priv->mcdi->r5_rproc);
> + rproc_put(priv->mcdi->r5_rproc);
> }
>
> static const struct of_device_id amd_edac_match[] = {
> --
Why is this a separate patch and not part of patch 1?
Also, do you have the hardware to test this on? IOW, have you tested those
patches?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette