selftests/bpf: Destroy XDP link correctly
authorAndrii Nakryiko <andrii@kernel.org>
Sun, 7 Nov 2021 16:55:20 +0000 (08:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:23 +0000 (11:04 +0100)
commit57d3ec1106fcbde49083adbb7feb8930d1a787a2
tree48927e10237f2f0bd631200a3672a0b4c1ce8b53
parent7ffd2af8085c845f6935fe93768812439ce3b14b
selftests/bpf: Destroy XDP link correctly

[ Upstream commit f91231eeeed752119f49eb6620cae44ec745a007 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c