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...@lab.ntt.co.jp>
---
 samples/sockmap/sockmap_user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c
index 7c25c0c112bc..95a54a89a532 100644
--- a/samples/sockmap/sockmap_user.c
+++ b/samples/sockmap/sockmap_user.c
@@ -566,6 +566,7 @@ int main(int argc, char **argv)
        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);
-- 
2.13.6


Reply via email to