From: Xiaolei Wang <xiaolei.wang@windriver.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com,
xiaolei.wang@windriver.com
Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH V2 0/2] Fix two memory leaks in rproc_attach()
Date: Sat, 26 Apr 2025 14:53:46 +0800 [thread overview]
Message-ID: <20250426065348.1234391-1-xiaolei.wang@windriver.com> (raw)
In the rproc_attach() function, if rproc_handle_resources() returns
failure, if the rproc->ops->unprepare callback function is not set,
the resources allocated by rproc_prepare_device() cannot be released,
and rproc->clean_table should also be released
patch1 adds rproc->ops->unprepare callback function to imx_rproc
patch2 releases rproc->clean_table
Changes in v2:
Updated the commit log of these two patches
Link to 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: imx_rproc: release carveout under imx_rproc after
rproc_attach() fails
remoteproc: core: release rproc->clean_table after rproc_attach()
fails
drivers/remoteproc/imx_rproc.c | 14 ++++++++++++++
drivers/remoteproc/remoteproc_core.c | 1 +
2 files changed, 15 insertions(+)
--
2.25.1
next reply other threads:[~2025-04-26 7:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-26 6:53 Xiaolei Wang [this message]
2025-04-26 6:53 ` [PATCH V2 1/2] remoteproc: imx_rproc: release carveout under imx_rproc after rproc_attach() fails Xiaolei Wang
2025-04-26 13:18 ` Peng Fan
2025-04-26 13:46 ` xiaolei wang
2025-04-26 20:14 ` Mathieu Poirier
2025-04-27 0:11 ` xiaolei wang
2025-04-27 2:30 ` Peng Fan
2025-04-28 16:49 ` Mathieu Poirier
2025-04-29 2:19 ` Xiaolei Wang
2025-04-26 6:53 ` [PATCH V2 2/2] remoteproc: core: release rproc->clean_table " Xiaolei Wang
2025-04-29 2:20 ` Xiaolei Wang
2025-04-29 17:30 ` Mathieu Poirier
2025-04-29 22:47 ` xiaolei wang
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=20250426065348.1234391-1-xiaolei.wang@windriver.com \
--to=xiaolei.wang@windriver.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 \
/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