lkml.org 
[lkml]   [2023]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] perf: qcom_l2_pmu: Make l2_cache_pmu_probe_cluster() more robust
Date
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

\
 
 \ /
  Last update: 2023-06-05 18:35    [W:0.054 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site