[PATCH V2 0/2] Fix two memory leaks in rproc_attach()
From: Xiaolei Wang
Date: Sat Apr 26 2025 - 02:55:58 EST
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@xxxxxxxxxxxxx/
https://patchwork.kernel.org/project/linux-remoteproc/patch/20250424122252.2777363-2-xiaolei.wang@xxxxxxxxxxxxx/
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