Re: [PATCH 2/5] EDAC/versalnet: Release reference to remoteproc device in remove
From: Prasanna Kumar T S M
Date: Mon Mar 23 2026 - 03:25:37 EST
Hi Boris,
On 22-03-2026 21:29, Borislav Petkov wrote:
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?
I can merge this and the previous into a single patch. Will do as part of v2.
Also, do you have the hardware to test this on? IOW, have you tested those
patches?
Yes, I do. Tested the change using 6.6 kernel with back ported driver.
Thanks,
Prasanna Kumar