mirror of
https://github.com/torvalds/linux.git
synced 2025-01-01 07:42:07 +00:00
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: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
9492686c53
commit
444890c3ce
@ -566,6 +566,7 @@ run:
|
||||
else
|
||||
fprintf(stderr, "unknown test\n");
|
||||
out:
|
||||
bpf_prog_detach2(prog_fd[2], cg_fd, BPF_CGROUP_SOCK_OPS);
|
||||
close(s1);
|
||||
close(s2);
|
||||
close(p1);
|
||||
|
Loading…
Reference in New Issue
Block a user