projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9492686
)
bpf: samples/sockmap detach sock ops program
author
Prashant Bhole
<bhole_prashant_q7@lab.ntt.co.jp>
Tue, 13 Feb 2018 04:44:22 +0000
(13:44 +0900)
committer
Alexei Starovoitov
<ast@kernel.org>
Wed, 14 Feb 2018 01:46:53 +0000
(17:46 -0800)
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>
samples/sockmap/sockmap_user.c
patch
|
blob
|
history
diff --git
a/samples/sockmap/sockmap_user.c
b/samples/sockmap/sockmap_user.c
index
7c25c0c
..
95a54a8
100644
(file)
--- a/
samples/sockmap/sockmap_user.c
+++ b/
samples/sockmap/sockmap_user.c
@@
-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);