Re: [PATCH] EDAC/versalnet: fix remoteproc reference leak
From: Borislav Petkov
Date: Sun Sep 27 2026 - 17:18:37 EST
On Wed, Sep 23, 2026 at 05:10:26PM +0530, Pandey, Radhey Shyam wrote:
> 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@xxxxxxxxxxxxxxx
> > Signed-off-by: Guangshuo Li <lgs201920130244@xxxxxxxxx>
>
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xxxxxxx>
> Thanks!> ---
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette