lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DU0PR04MB941768B7C12EA715D0BB553D88939@DU0PR04MB9417.eurprd04.prod.outlook.com>
Date:   Wed, 10 Nov 2021 08:53:21 +0000
From:   Peng Fan <peng.fan@....com>
To:     Mathieu Poirier <mathieu.poirier@...aro.org>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
CC:     "ohad@...ery.com" <ohad@...ery.com>,
        "bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        Hongxing Zhu <hongxing.zhu@....com>,
        "linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH] remoteproc: imx_rproc: Fix a resource leak in the remove
 function

> Subject: Re: [PATCH] remoteproc: imx_rproc: Fix a resource leak in the
> remove function
> 
> On Sat, Oct 16, 2021 at 08:44:28AM +0200, Christophe JAILLET wrote:
> > 'priv->workqueue' is destroyed in the error handling path of the probe
> > but not in the remove function.
> >
> > Add the missing call to release some resources.
> >
> > Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox")
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > ---
> > This patch is speculative. I'm not sure if the added function call is
> > at the right place in the remove function.
> > Review with care.
> > ---
> >  drivers/remoteproc/imx_rproc.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/remoteproc/imx_rproc.c
> > b/drivers/remoteproc/imx_rproc.c index ff8170dbbc3c..0a45bc0d3f73
> > 100644
> > --- a/drivers/remoteproc/imx_rproc.c
> > +++ b/drivers/remoteproc/imx_rproc.c
> > @@ -804,6 +804,7 @@ static int imx_rproc_remove(struct platform_device
> *pdev)
> >  	clk_disable_unprepare(priv->clk);
> >  	rproc_del(rproc);
> >  	imx_rproc_free_mbox(rproc);
> > +	destroy_workqueue(priv->workqueue);
> 
> This seems to be the right thing to do. Peng - please review and test on your
> side.

Sorry for late reply, I built the driver as a module with this patch. And no issue found.

THnaks,
Peng.

> 
> Thanks,
> Mathieu
> 
> >  	rproc_free(rproc);
> >
> >  	return 0;
> > --
> > 2.30.2
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ