diff options
| author | Ian Rogers <[email protected]> | 2023-05-26 19:44:42 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-05-28 13:17:36 +0000 |
| commit | 797b9ec8c4bc9ec89f633a9b2c710b7b64753ca4 (patch) | |
| tree | 7f13671a5e26a83cb880515cba474b91a37efce1 /tools/perf/util/scripting-engines/trace-event-perl.c | |
| parent | perf evsel: Don't let evsel__group_pmu_name() traverse unsorted group (diff) | |
| download | kernel-797b9ec8c4bc9ec89f633a9b2c710b7b64753ca4.tar.gz kernel-797b9ec8c4bc9ec89f633a9b2c710b7b64753ca4.zip | |
perf evsel: Don't let for_each_group() treat the head of the list as one of its nodes
Address/memory sanitizer was reporting issues in evsel__group_pmu_name
because the for_each_group_evsel loop didn't terminate when the head
was reached, the head would then be cast and accessed as an evsel
leading to invalid memory accesses.
Fix for_each_group_member and for_each_group_evsel to terminate at the
list head. Note, evsel__group_pmu_name no longer iterates the group, but
the problem is present regardless.
Fixes: 717e263fc354d53d ("perf report: Show group description when event group is enabled")
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Changbin Du <[email protected]>
Cc: Dmitrii Dolgov <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: James Clark <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sandipan Das <[email protected]>
Cc: Xing Zhengjun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions
