summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-08-09 00:14:42 -0700
committerNamhyung Kim <namhyung@kernel.org>2026-08-09 21:58:10 -0700
commit08e96e3c737bf63d917c6c4e0bb67450ad53f1d8 (patch)
tree07efa309e5a410a2e548a75ef6967427e501d1fb /scripts/stackusage
parent340641a4b5fff4f4b12261c9d92169f6e2ea11f4 (diff)
downloadlinux-08e96e3c737bf63d917c6c4e0bb67450ad53f1d8.tar.gz
linux-08e96e3c737bf63d917c6c4e0bb67450ad53f1d8.zip
perf tools: Fix sb_evlist leaks in top and record
Fix a memory leak in cmd_top() where top.sb_evlist was not freed if evlist__add_bpf_sb_event() fails. Note that evlist__start_sb_thread() and evlist__stop_sb_thread() take ownership of the evlist and free it, so we must only free it if we fail before starting the thread. Also set top.sb_evlist to NULL to prevent use-after-free bugs. Apply the same fix to builtin-record.c to avoid leaking rec->sb_evlist and calling pthread_join on uninitialized threads in the error path. Assisted-by: Antigravity:gemini-3.1-pro Fixes: b38d85ef49cf ("perf bpf: Decouple creating the evlist from adding the SB event") Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions