Re: [PATCH] perf: qcom_l2_pmu: Make l2_cache_pmu_probe_cluster() more robust

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 May 2023 10:18:08 +0200, Christophe JAILLET wrote:
> If an error occurs after calling list_add(), the &l2cache_pmu->clusters
> list will reference some memory that will be freed when the managed
> resources will be released.
> 
> Move the list_add() at the end of the function when everything is in fine.
> 
> This is harmless because if l2_cache_pmu_probe_cluster() fails, then
> l2_cache_pmu_probe() will fail as well and 'l2cache_pmu' will be released
> as well.
> But it looks cleaner and could silence static checker warning.
> 
> [...]

Applied to will (for-next/perf), thanks!

[1/1] perf: qcom_l2_pmu: Make l2_cache_pmu_probe_cluster() more robust
      https://git.kernel.org/will/c/7bd42f122c7c

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux