bpf: fix bpf_perf_event_read() loop upper bound
authorWei-Chun Chao <weichunc@plumgrid.com>
Wed, 12 Aug 2015 14:57:12 +0000 (07:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Aug 2015 23:42:50 +0000 (16:42 -0700)
commit140d8b335a9beb234fd0ed9a15aa6a47f47fd771
tree8e68a8ebfcc14bcda57bc1cca307a9d8b0534eb5
parentdcef70704d6c2792c6025ceba9708554d441a4bb
bpf: fix bpf_perf_event_read() loop upper bound

Verifier rejects programs incorrectly.

Fixes: 35578d798400 ("bpf: Implement function bpf_perf_event_read()")
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: Wei-Chun Chao <weichunc@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c