linux-yocto/tools/perf
Leo Yan f85b2b00ba perf tests bp_account: Fix leaked file descriptor
[ Upstream commit 4a6cdecaa1 ]

Since the commit e9846f5ead ("perf test: In forked mode add check that
fds aren't leaked"), the test "Breakpoint accounting" reports the error:

  # perf test -vvv "Breakpoint accounting"
  20: Breakpoint accounting:
  --- start ---
  test child forked, pid 373
  failed opening event 0
  failed opening event 0
  watchpoints count 4, breakpoints count 6, has_ioctl 1, share 0
  wp 0 created
  wp 1 created
  wp 2 created
  wp 3 created
  wp 0 modified to bp
  wp max created
  ---- end(0) ----
  Leak of file descriptor 7 that opened: 'anon_inode:[perf_event]'

A watchpoint's file descriptor was not properly released. This patch
fixes the leak.

Fixes: 032db28e5f ("perf tests: Add breakpoint accounting/modify test")
Reported-by: Aishwarya TCV <aishwarya.tcv@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250711-perf_fix_breakpoint_accounting-v1-1-b314393023f9@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 12:05:03 +02:00
..
arch perf intel-pt: Fix exclude_guest setting 2024-08-03 08:49:15 +02:00
bench perf bench internals inject-build-id: Fix trap divide when collecting just one DSO 2024-06-12 11:03:40 +02:00
dlfilters
Documentation perf: script: add raw|disasm arguments to --insn-trace option 2024-06-27 13:46:23 +02:00
examples/bpf
include
jvmti
pmu-events perf vendor events: Drop STORES_PER_INST metric event for power10 platform 2023-09-19 12:28:00 +02:00
python
scripts perf scripts python: exported-sql-viewer.py: Fix pattern matching with Python 3 2025-06-27 11:07:15 +01:00
tests perf tests bp_account: Fix leaked file descriptor 2025-08-15 12:05:03 +02:00
trace tools headers uapi: Sync linux/stat.h with the kernel sources 2022-10-25 17:40:48 -03:00
ui perf ui browser hists: Set actions->thread before calling do_zoom_thread() 2025-06-27 11:07:14 +01:00
util perf sched: Fix memory leaks for evsel->priv in timehist 2025-08-15 12:05:02 +02:00
.gitignore perf tools: Add the include/perf/ directory to .gitignore 2022-11-08 18:54:41 -03:00
Build
builtin-annotate.c perf annotate: Get rid of duplicate --group option item 2024-06-12 11:03:34 +02:00
builtin-bench.c perf bench: Add missing setlocale() call to allow usage of %'d style formatting 2023-07-19 16:21:36 +02:00
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf mem/c2c: Set PERF_SAMPLE_WEIGHT for LOAD_STORE events 2022-10-06 16:29:32 -03:00
builtin-config.c
builtin-daemon.c perf daemon: Fix file leak in daemon_session__control 2024-06-12 11:03:42 +02:00
builtin-data.c
builtin-diff.c perf tools: Make quiet mode consistent between tools 2022-12-31 13:33:07 +01:00
builtin-evlist.c
builtin-ftrace.c perf ftrace latency: Fix unit on histogram first entry when using --use-nsec 2024-12-14 19:53:44 +01:00
builtin-help.c
builtin-inject.c perf inject: Fix leader sampling inserting additional samples 2024-10-17 15:21:01 +02:00
builtin-kallsyms.c
builtin-kmem.c libsubcmd: Don't free the usage string 2024-10-17 15:22:11 +02:00
builtin-kvm.c libsubcmd: Don't free the usage string 2024-10-17 15:22:11 +02:00
builtin-kwork.c libsubcmd: Don't free the usage string 2024-10-17 15:22:11 +02:00
builtin-list.c perf list: Fix metricgroups title message 2022-10-14 12:21:42 -03:00
builtin-lock.c perf lock: Don't pass an ERR_PTR() directly to perf_session__delete() 2024-10-17 15:22:28 +02:00
builtin-mem.c libsubcmd: Don't free the usage string 2024-10-17 15:22:11 +02:00
builtin-probe.c perf probe: Check -v and -q options in the right place 2022-12-31 13:33:08 +01:00
builtin-record.c perf record: Fix incorrect --user-regs comments 2025-06-27 11:07:15 +01:00
builtin-report.c perf report: Avoid SEGV in report__setup_sample_type() 2024-06-12 11:03:41 +02:00
builtin-sched.c perf sched: Fix memory leaks in 'perf sched latency' 2025-08-15 12:05:02 +02:00
builtin-script.c perf script: Show also errors for --insn-trace option 2024-06-27 13:46:23 +02:00
builtin-stat.c perf stat: Fix affinity memory leaks on error path 2024-12-14 19:53:43 +01:00
builtin-timechart.c
builtin-top.c perf top: Don't pass an ERR_PTR() directly to perf_session__delete() 2023-09-19 12:28:00 +02:00
builtin-trace.c perf trace: Avoid garbage when not printing a syscall's arguments 2024-12-14 19:53:46 +01:00
builtin-version.c
builtin.h
check-headers.sh tools headers: Update the copy of x86's memcpy_64.S used in 'perf bench' 2022-10-25 17:40:48 -03:00
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config perf build: Warn when libdebuginfod devel files are not available 2025-06-27 11:07:14 +01:00
Makefile.perf perf test: Add arm64 asm pureloop test shell script 2022-10-06 14:50:49 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh perf tools: Fix auto-complete on aarch64 2023-03-10 09:33:27 +01:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c
perf.h