aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts
diff options
context:
space:
mode:
authorStephane Eranian <[email protected]>2022-09-28 11:40:42 -0700
committerPeter Zijlstra <[email protected]>2022-09-29 12:20:56 +0200
commit117ceeb1f4f87331e45a77e71f18303d15ec882e (patch)
tree31299bdd4bd3ac6b5e79e78b1617315d68e57dc8 /tools/perf/scripts
parentcfef80bad4cf79cdc964a53c98254dfa462be83f (diff)
perf/x86/utils: Fix uninitialized var in get_branch_type()
offset is passed as a pointer and on certain call path is not set by the function. If the caller does not re-initialize offset between calls, value could be inherited between calls. Prevent this by initializing offset on each call. This impacts the code in amd_pmu_lbr_filter() which does: for(i=0; ...) { ret = get_branch_type_fused(..., &offset); if (offset) lbr_entries[i].from += offset; } Fixes: df3e9612f758 ("perf/x86: Make branch classifier fusion-aware") Signed-off-by: Stephane Eranian <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Sandipan Das <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions