From: Prashant Bhole Date: Tue, 13 Feb 2018 04:44:22 +0000 (+0900) Subject: bpf: samples/sockmap detach sock ops program X-Git-Tag: v4.19~1326^2~369^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=444890c3ce7d74bdc20f2bf930b8476b98d3e972;p=platform%2Fkernel%2Flinux-rpi3.git 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 Signed-off-by: Alexei Starovoitov --- diff --git a/samples/sockmap/sockmap_user.c b/samples/sockmap/sockmap_user.c index 7c25c0c..95a54a8 100644 --- 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);