Commit 444890c3 authored by Prashant Bhole's avatar Prashant Bhole Committed by Alexei Starovoitov

bpf: samples/sockmap detach sock ops program

samples/sockops program keeps the sock_ops program attached to cgroup.
Fixed this by detaching program before exit.
Signed-off-by: default avatarPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 9492686c
...@@ -566,6 +566,7 @@ int main(int argc, char **argv) ...@@ -566,6 +566,7 @@ int main(int argc, char **argv)
else else
fprintf(stderr, "unknown test\n"); fprintf(stderr, "unknown test\n");
out: out:
bpf_prog_detach2(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS);
close(s1); close(s1);
close(s2); close(s2);
close(p1); close(p1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment