summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2023-04-12 14:04:22 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2023-04-13 14:32:05 +0200
commitc1e07a80cf23d3a6e96172bc9a73bfa912a9fcbc (patch)
tree923b3cb072fd14e404aa17f79ea11d3778a7ec2a /tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
parentde6d014a09bf12a9a8959d60c0a1d4a41d394a89 (diff)
downloadlinux-c1e07a80cf23d3a6e96172bc9a73bfa912a9fcbc.tar.gz
linux-c1e07a80cf23d3a6e96172bc9a73bfa912a9fcbc.tar.bz2
linux-c1e07a80cf23d3a6e96172bc9a73bfa912a9fcbc.zip
selftests/bpf: Fix leaked bpf_link in get_stackid_cannot_attach
skel->links.oncpu is leaked in one case. This causes test perf_branches fails when it runs after get_stackid_cannot_attach: ./test_progs -t get_stackid_cannot_attach,perf_branches 84 get_stackid_cannot_attach:OK test_perf_branches_common:PASS:test_perf_branches_load 0 nsec test_perf_branches_common:PASS:attach_perf_event 0 nsec test_perf_branches_common:PASS:set_affinity 0 nsec check_good_sample:FAIL:output not valid no valid sample from prog 146/1 perf_branches/perf_branches_hw:FAIL 146/2 perf_branches/perf_branches_no_hw:OK 146 perf_branches:FAIL All error logs: test_perf_branches_common:PASS:test_perf_branches_load 0 nsec test_perf_branches_common:PASS:attach_perf_event 0 nsec test_perf_branches_common:PASS:set_affinity 0 nsec check_good_sample:FAIL:output not valid no valid sample from prog 146/1 perf_branches/perf_branches_hw:FAIL 146 perf_branches:FAIL Summary: 1/1 PASSED, 0 SKIPPED, 1 FAILED Fix this by adding the missing bpf_link__destroy(). Fixes: 346938e9380c ("selftests/bpf: Add get_stackid_cannot_attach") Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20230412210423.900851-3-song@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c')
0 files changed, 0 insertions, 0 deletions