public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] EDAC/versalnet: Fix teardown ordering in mc_remove()
@ 2026-03-22 13:11 Prasanna Kumar T S M
  2026-03-22 13:11 ` [PATCH 2/5] EDAC/versalnet: Release reference to remoteproc device in remove Prasanna Kumar T S M
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Prasanna Kumar T S M @ 2026-03-22 13:11 UTC (permalink / raw)
  To: ptsm, shubhrajyoti.datta, bp, tony.luck, linux-edac, linux-kernel; +Cc: stable

The teardown sequence in mc_remove() does not mirror the reverse of the
initialization order in mc_probe(). In particular,
unregister_rpmsg_driver() is called before remove_versalnet(), and
cdx_mcdi_finish() is called after rproc_shutdown().

Reorder mc_remove() to reverse the probe initialization sequence,
consistent with the probe error-unwind paths.

Fixes: d5fe2fec6c40d ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Cc: stable@vger.kernel.org
Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
---
 drivers/edac/versalnet_edac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/versalnet_edac.c b/drivers/edac/versalnet_edac.c
index 0b47ed7fed63..f70243bc8a7a 100644
--- a/drivers/edac/versalnet_edac.c
+++ b/drivers/edac/versalnet_edac.c
@@ -954,10 +954,10 @@ static void mc_remove(struct platform_device *pdev)
 {
 	struct mc_priv *priv = platform_get_drvdata(pdev);
 
-	unregister_rpmsg_driver(&amd_rpmsg_driver);
 	remove_versalnet(priv);
-	rproc_shutdown(priv->mcdi->r5_rproc);
 	cdx_mcdi_finish(priv->mcdi);
+	unregister_rpmsg_driver(&amd_rpmsg_driver);
+	rproc_shutdown(priv->mcdi->r5_rproc);
 }
 
 static const struct of_device_id amd_edac_match[] = {
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-03-26 17:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-22 13:11 [PATCH 1/5] EDAC/versalnet: Fix teardown ordering in mc_remove() Prasanna Kumar T S M
2026-03-22 13:11 ` [PATCH 2/5] EDAC/versalnet: Release reference to remoteproc device in remove Prasanna Kumar T S M
2026-03-22 15:59   ` Borislav Petkov
2026-03-23  7:25     ` Prasanna Kumar T S M
2026-03-22 13:11 ` [PATCH 3/5] EDAC/versalnet: Fix memory leak in remove and probe error paths Prasanna Kumar T S M
2026-03-22 19:15   ` Borislav Petkov
2026-03-22 13:11 ` [PATCH 4/5] EDAC/versalnet: Fix device_register() error handling in init_one_mc() Prasanna Kumar T S M
2026-03-22 16:10   ` Borislav Petkov
2026-03-23  7:08     ` Prasanna Kumar T S M
2026-03-24 11:23       ` Borislav Petkov
2026-03-24 12:16         ` Borislav Petkov
2026-03-22 13:11 ` [PATCH 5/5] EDAC/versalnet: Fix device name memory leak Prasanna Kumar T S M
2026-03-22 16:15   ` Borislav Petkov
2026-03-23  6:59     ` Prasanna Kumar T S M
2026-03-26 17:23   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox