[PATCH v2] powerpc/papr_scm: Fix leaking nvdimm_events_map elements

Michael Ellerman patch-notifications at ellerman.id.au
Tue May 24 21:09:45 AEST 2022


On Wed, 11 May 2022 13:56:36 +0530, Vaibhav Jain wrote:
> Right now 'char *' elements allocated for individual 'stat_id' in
> 'papr_scm_priv.nvdimm_events_map[]' during papr_scm_pmu_check_events(), get
> leaked in papr_scm_remove() and papr_scm_pmu_register(),
> papr_scm_pmu_check_events() error paths.
> 
> Also individual 'stat_id' arent NULL terminated 'char *' instead they are fixed
> 8-byte sized identifiers. However papr_scm_pmu_register() assumes it to be a
> NULL terminated 'char *' and at other places it assumes it to be a
> 'papr_scm_perf_stat.stat_id' sized string which is 8-byes in size.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/papr_scm: Fix leaking nvdimm_events_map elements
      https://git.kernel.org/powerpc/c/0e0946e22f3665d27325d389ff45ade6e93f3678

cheers


More information about the Linuxppc-dev mailing list