From: "Pandey, Radhey Shyam" <radheys@amd.com>
To: Guangshuo Li <lgs201920130244@gmail.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>,
Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] EDAC/versalnet: fix remoteproc reference leak
Date: Wed, 23 Sep 2026 17:10:26 +0530 [thread overview]
Message-ID: <cedf454c-1840-41a2-810e-16f0cfee452d@amd.com> (raw)
In-Reply-To: <20260913053532.1324671-1-lgs201920130244@gmail.com>
On 9/13/2026 11:05 AM, Guangshuo Li wrote:
Nit - EDAC/versalnet: Fix remoteproc reference leak in mc_remove()>
mc_probe() acquires a reference to the remote processor with
> rproc_get_by_phandle(), but mc_remove() does not release the reference.
>
> rproc_shutdown() only balances the power reference acquired by
> rproc_boot(); it does not drop the device reference acquired by
> rproc_get_by_phandle(). As a result, successful driver removal leaves
> the remoteproc reference unbalanced.
>
> Call rproc_put() during removal to release the reference acquired in
> mc_probe().
>
> This issue was found by manual code inspection.
>
> Fixes: d5fe2fec6c40d ("EDAC: Add a driver for the AMD Versal NET DDR controller")
> Cc: stable@vger.kernel.org
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Thanks!> ---
> 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 97ec05d68bbb..3a06b41c1d84 100644
> --- a/drivers/edac/versalnet_edac.c
> +++ b/drivers/edac/versalnet_edac.c
> @@ -953,6 +953,7 @@ static void mc_remove(struct platform_device *pdev)
> remove_versalnet(priv);
> rproc_shutdown(priv->mcdi->r5_rproc);
> cdx_mcdi_finish(priv->mcdi);
> + rproc_put(priv->mcdi->r5_rproc);
> kfree(priv->mcdi);
> }
>
prev parent reply other threads:[~2026-09-23 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 5:35 Guangshuo Li
2026-09-23 11:40 ` Pandey, Radhey Shyam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cedf454c-1840-41a2-810e-16f0cfee452d@amd.com \
--to=radheys@amd.com \
--cc=bp@alien8.de \
--cc=lgs201920130244@gmail.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shubhrajyoti.datta@amd.com \
--cc=stable@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®