linux-yocto/tools
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
..
accounting
arch x86/rdrand: Disable RDSEED on AMD Cyan Skillfish 2025-07-17 18:37:14 +02:00
bootconfig tools/bootconfig: Fix the wrong format specifier 2025-02-08 09:58:00 +01:00
bpf bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure 2025-08-15 12:13:40 +02:00
build tools/build: Don't pass test log files to linker 2025-05-29 11:02:08 +02:00
certs
cgroup memcg_slabinfo: Fix use of PG_slab 2025-08-15 12:13:46 +02:00
counter
crypto
debugging
firewire
firmware
gpio
hv tools/hv: fcopy: Fix incorrect file path conversion 2025-08-01 09:48:40 +01:00
iio
include kallsyms: fix build without execinfo 2025-07-17 18:37:13 +02:00
kvm/kvm_stat
laptop
leds
lib perf tools: Fix use-after-free in help_unknown_cmd() 2025-08-15 12:13:51 +02:00
memory-model
mm
net tools: ynl-gen: validate 0 len strings from kernel 2025-05-29 11:03:12 +02:00
objtool objtool/rust: add one more noreturn Rust function for Rust 1.89.0 2025-07-24 08:56:22 +02:00
pci
pcmcia
perf perf tests bp_account: Fix leaked file descriptor 2025-08-15 12:13:54 +02:00
power tools/power turbostat: Fix AMD package-energy reporting 2025-06-19 15:32:21 +02:00
rcu
sched_ext tools/sched_ext: Add helper to check task migration state 2025-03-22 12:54:28 -07:00
scripts
sound ASoC: dapm-graph: set fill colour of turned on nodes 2025-03-22 12:54:20 -07:00
spi
testing selftests: rtnetlink.sh: remove esp4_offload after test 2025-08-15 12:13:48 +02:00
thermal
time
tracing rtla/timerlat_top: Abort event processing on second signal 2025-02-21 14:01:25 +01:00
usb
verification tools/rv: Do not skip idle in trace 2025-08-15 12:13:46 +02:00
virtio
wmi
workqueue
writeback
Makefile