diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-06 21:51:42 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-10 15:23:53 -0300 |
| commit | b145137fec13dc8fc7fcb14193ce395a1164e3a1 (patch) | |
| tree | 7fb6d7c95d54f3bd5f20f019c5f7d7587ab2ebb9 /tools/perf/scripts/python/stackcollapse.py | |
| parent | d9b99dc8148e0c1f5da3942131b47e0d21187a32 (diff) | |
perf tools: Add O_CLOEXEC to open() calls in DSO and ELF code
open() calls in dso.c and symbol-elf.c omit O_CLOEXEC, which leaks
file descriptors to child processes spawned during symbol resolution
(e.g., addr2line, objdump). This can exhaust the fd limit during
long profiling sessions or when processing many DSOs.
Add O_CLOEXEC to all open() calls in both files (12 call sites).
Fixes: cdd059d731eeb466 ("perf tools: Move dso_* related functions into dso object")
Fixes: e5a1845fc0aeca85 ("perf symbols: Split out util/symbol-elf.c")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
