aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-28 23:58:39 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-29 20:53:46 +0200
commitab20a3090d338c4f161cb1a68e64a7f8914569ea (patch)
treeddfc0c3f7b95b5ca9d79b566655d312ca44b0b24 /scripts/Makefile.thinlto
parentperf python: Initialize debug output on module load (diff)
perf pmu: Fix race with concurrent tracepoint creation and removal in perf list
perf_pmus__print_pmu_events() first counts events via perf_pmu__num_events() to allocate the aliases array, then populates it via perf_pmu__for_each_event(). When dynamic tracepoints (such as kprobes or uprobes during 'perf test' runs) are concurrently created or removed between the two passes: - If an event is removed, state.index is smaller than the allocated len, leaving trailing zeroed entries in aliases[] with name == NULL and pmu == NULL, which causes qsort(cmp_sevent) or the print loop to crash with SIGSEGV. - If a dynamic tracepoint subsystem directory is removed while scanning /sys/kernel/tracing/events, tp_pmu__for_each_tp_event() returns -ENOENT and aborts enumeration of all remaining tracepoint subsystems. - If an event is added, perf_pmus__print_pmu_events__callback() aborts enumeration when state->index reaches state->aliases_len. Grow state->aliases dynamically via realloc() when needed, use state.index as the actual populated length for sorting and printing, and ignore -ENOENT when a tracepoint subsystem directory disappears during enumeration. Fixes: c3245d2093c16c60 ("perf pmu: Abstract alias/event struct") Fixes: 45b6e281cb0648ac ("perf tp_pmu: Add event APIs") Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions