]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Destroy XDP link correctly
authorAndrii Nakryiko <andrii@kernel.org>
Sun, 7 Nov 2021 16:55:20 +0000 (08:55 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 7 Nov 2021 17:14:15 +0000 (09:14 -0800)
commitc15b6d37e3c845f7b5b0e920b90f01eb410a2119
tree59b6dc423bef1504e4fdb7be307cf1b8546aa4f2
parent88fab140efde881da1a128b4127f5b95a991d7f2
selftests/bpf: Destroy XDP link correctly

bpf_link__detach() was confused with bpf_link__destroy() and leaves
leaked FD in the process. Fix the problem.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Hengqi Chen <hengqi.chen@gmail.com>
Link: https://lore.kernel.org/bpf/20211107165521.9240-9-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c