[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <171937447098.2860644.3823008923122929164.b4-ty@kernel.org>
Date: Tue, 25 Jun 2024 21:01:46 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: peterz@...radead.org,
	acme@...hat.com,
	irogers@...gle.com,
	Junhao He <hejunhao3@...wei.com>
Cc: jonathan.cameron@...wei.com,
	yangyicong@...wei.com,
	linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linuxarm@...wei.com,
	prime.zeng@...ilicon.com,
	adrian.hunter@...el.com,
	alexander.shishkin@...ux.intel.com,
	cuigaosheng1@...wei.com,
	mingo@...hat.com,
	james.clark@....com,
	renyu.zj@...ux.alibaba.com,
	jolsa@...nel.org,
	john.g.garry@...cle.com,
	kjain@...ux.ibm.com,
	kan.liang@...ux.intel.com,
	mark.rutland@....com,
	ravi.bangoria@....com,
	robh@...nel.org,
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf pmus: Fixes always false when compare duplicates aliases
On Fri, 14 Jun 2024 17:43:18 +0800, Junhao He wrote:
> In the previous loop, all the members in the aliases[j-1] have been freed
> and set to NULL. But in this loop, the function pmu_alias_is_duplicate()
> compares the aliases[j] with the aliases[j-1] that has already been
> disposed, so the function will always return false and duplicate aliases
> will never be discarded.
> 
> If we find duplicate aliases, it skips the zfree aliases[j], which is
> accompanied by a memory leak.
> 
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung
Powered by blists - more mailing lists