]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: bpf: Pass program to bpf_prog_detach in flow_dissector
authorLorenz Bauer <lmb@cloudflare.com>
Mon, 29 Jun 2020 09:56:30 +0000 (10:56 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 30 Jun 2020 17:46:39 +0000 (10:46 -0700)
commit899c7d2491150d62364e2d3323cb483cd9354483
tree51347f94f585ce81fddfbee355802ce1edd2923f
parentfaac80c160e3c72fa9fbbbfbca4286f4030853d3
selftests: bpf: Pass program to bpf_prog_detach in flow_dissector

Calling bpf_prog_detach is incorrect, since it takes target_fd as
its argument. The intention here is to pass it as attach_bpf_fd,
so use bpf_prog_detach2 and pass zero for target_fd.

Fixes: 5f8a1d8a527c ("selftests/bpf: Extend test_flow_dissector to cover link creation")
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200629095630.7933-7-lmb@cloudflare.com
tools/testing/selftests/bpf/prog_tests/flow_dissector.c