From: Peng Fan <peng.fan@oss.nxp.com>
To: Xiaolei Wang <xiaolei.wang@windriver.com>
Cc: andersson@kernel.org, mathieu.poirier@linaro.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com,
linux-remoteproc@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] Fix two memory leaks in rproc_attach()
Date: Tue, 6 May 2025 16:56:22 +0800 [thread overview]
Message-ID: <20250506085622.GA3240@nxa18884-linux> (raw)
In-Reply-To: <20250430092043.1819308-1-xiaolei.wang@windriver.com>
On Wed, Apr 30, 2025 at 05:20:41PM +0800, Xiaolei Wang wrote:
>In the rproc_attach() function, if rproc_handle_resources() returns
>failure, the resources requested in imx_rproc_prepare() should be
>released, since almost the same thing is done in imx_rproc_prepare() and
>rproc_resource_cleanup(), Function rproc_resource_cleanup() is able
>to deal with empty lists so it is better to fix the "goto" statements
>in rproc_attach(). replace the "unprepare_device" goto statement with
>"clean_up_resources" and get rid of the "unprepare_device" label.
>and rproc->clean_table should also be released
>
>Changes in v3:
> Update patch1, replace the "unprepare_device" goto statement with
> "clean_up_resources" and get rid of the "unprepare_device" label.
>
>V2:
> Updated the commit log of these two patches
> https://patchwork.kernel.org/project/linux-remoteproc/patch/20250426065348.1234391-2-xiaolei.wang@windriver.com/
> https://patchwork.kernel.org/project/linux-remoteproc/patch/20250426065348.1234391-3-xiaolei.wang@windriver.com/
>
>V1: https://patchwork.kernel.org/project/linux-remoteproc/patch/20250424122252.2777363-1-xiaolei.wang@windriver.com/
> https://patchwork.kernel.org/project/linux-remoteproc/patch/20250424122252.2777363-2-xiaolei.wang@windriver.com/
>
>Xiaolei Wang (2):
> remoteproc: cleanup acquired resources when rproc_handle_resources()
> fails in rproc_attach()
> remoteproc: core: release rproc->clean_table after rproc_attach()
> fails
>
> drivers/remoteproc/remoteproc_core.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Peng Fan <peng.fan@nxp.com>
next prev parent reply other threads:[~2025-05-06 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 9:20 [PATCH v3 0/2] Fix two memory leaks in rproc_attach() Xiaolei Wang
2025-04-30 9:20 ` [PATCH v3 1/2] remoteproc: cleanup acquired resources when rproc_handle_resources() fails " Xiaolei Wang
2025-04-30 9:20 ` [PATCH v3 2/2] remoteproc: core: release rproc->clean_table after rproc_attach() fails Xiaolei Wang
2025-05-06 8:56 ` Peng Fan [this message]
2025-05-06 17:28 ` [PATCH v3 0/2] Fix two memory leaks in rproc_attach() Mathieu Poirier
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=20250506085622.GA3240@nxa18884-linux \
--to=peng.fan@oss.nxp.com \
--cc=andersson@kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=xiaolei.wang@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.