Re: [PATCH v2] remoteproc: qcom: Fix leak when custom dump_segments addition fails
From: Wasim Nazir
Date: Thu Apr 16 2026 - 09:22:53 EST
On Wed, Mar 18, 2026 at 05:19:16PM +0530, Wasim Nazir wrote:
> Free allocated minidump_region 'name' in qcom_add_minidump_segments()
> when failing before adding the region to 'dump_segments'. Otherwise,
> the 'name' is not tracked and is never freed by qcom_minidump_cleanup().
>
> Return error when adding to 'dump_segments' fails.
>
> Cc: stable@xxxxxxxxxxxxxxx # v5.11
> Fixes: 8ed8485c4f05 ("remoteproc: qcom: Add capability to collect minidumps")
> Reviewed-by: Mukesh Ojha <mukesh.ojha@xxxxxxxxxxxxxxxx>
> Signed-off-by: Wasim Nazir <wasim.nazir@xxxxxxxxxxxxxxxx>
> ---
> Changes in v2:
> - Add fixes tag in commit.
> - Add stable mailing list in cc.
> - Link to v1: https://lore.kernel.org/r/20260316-rproc-memleak-v1-1-96b1518a1a61@xxxxxxxxxxxxxxxx
> ---
> drivers/remoteproc/qcom_common.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
Gentle reminder!
--
Regards,
Wasim