Re: [PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-16 Thread Alexei Starovoitov
On Fri, Jul 13, 2018 at 06:05:37PM +0300, Dan Carpenter wrote: > "prog_cnt" is the number of elements which are filled out in prog_fd[] > so the test should be >= instead of >. > > Signed-off-by: Dan Carpenter since this is sample code I've applied both patches to bpf-next tree. Thanks

Re: [PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-13 Thread David Ahern
On 7/13/18 11:05 AM, Dan Carpenter wrote: > "prog_cnt" is the number of elements which are filled out in prog_fd[] > so the test should be >= instead of >. > > Signed-off-by: Dan Carpenter > Fixes: 554ae6e792ef3 ("samples/bpf: add userspace example for prohibiting sockets") Reviewed-by: David A

[PATCH 2/2] samples/bpf: test_cgrp2_sock2: fix an off by one

2018-07-13 Thread Dan Carpenter
"prog_cnt" is the number of elements which are filled out in prog_fd[] so the test should be >= instead of >. Signed-off-by: Dan Carpenter diff --git a/samples/bpf/test_cgrp2_sock2.c b/samples/bpf/test_cgrp2_sock2.c index 3b5be2364975..a9277b118c33 100644 --- a/samples/bpf/test_cgrp2_sock2.c +++