diff options
| author | Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> | 2026-07-17 20:16:06 +0530 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-07-22 13:07:58 +0000 |
| commit | 3c748a5554f961aac8e9ab1e28b7884b1c525012 (patch) | |
| tree | 574d5952942fa7bc0ccd48b246d977b5cda923b0 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | e910315ae08a23bc953daed10b1c518abac1df49 (diff) | |
iommu/qcom: Fix pgtbl_ops leak in qcom_iommu_init_domain() error path
alloc_io_pgtable_ops() can succeed and then qcom_scm_restore_sec_cfg()
can fail for one of the context banks. The goto out_clear_iommu path
only cleared qcom_domain->iommu; the locally allocated pgtbl_ops was
never freed, leaking it permanently since qcom_domain->pgtbl_ops is only
assigned on the success path.
free_io_pgtable_ops() safely handles a NULL argument (covers the case
where alloc_io_pgtable_ops() itself failed), so add it unconditionally in
the out_clear_iommu handler.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
