Files
linux/tools/perf/tests
Leo Yan c149e3475c 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:13:54 +02:00
..
2024-06-26 11:07:11 -07:00
2024-08-12 18:05:14 -03:00
2023-05-27 09:41:39 -03:00
2024-09-03 10:15:16 -03:00
2024-09-11 11:27:42 -03:00
2023-03-13 17:42:27 -03:00
2024-09-11 11:27:42 -03:00
2024-08-12 18:05:14 -03:00
2024-07-31 16:12:46 -03:00
2024-08-12 18:05:14 -03:00
2024-08-19 14:49:53 -03:00