projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcef707
)
bpf: fix bpf_perf_event_read() loop upper bound
author
Wei-Chun Chao
<
[email protected]
>
Wed, 12 Aug 2015 14:57:12 +0000
(07:57 -0700)
committer
David S. Miller
<
[email protected]
>
Wed, 12 Aug 2015 23:42:50 +0000
(16:42 -0700)
Verifier rejects programs incorrectly.
Fixes: 35578d798400 ("bpf: Implement function bpf_perf_event_read()")
Cc: Kaixu Xia <
[email protected]
>
Cc: Alexei Starovoitov <
[email protected]
>
Signed-off-by: Wei-Chun Chao <
[email protected]
>
Acked-by: Daniel Borkmann <
[email protected]
>
Acked-by: Alexei Starovoitov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
kernel/bpf/verifier.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/verifier.c
b/kernel/bpf/verifier.c
index 48e1c719256038563c691653387428613d580214..ed12e385fb75997f559e345989b178bc4c709e22 100644
(file)
--- a/
kernel/bpf/verifier.c
+++ b/
kernel/bpf/verifier.c
@@
-853,7
+853,7
@@
static int check_map_func_compatibility(struct bpf_map *map, int func_id)
if (!map)
return 0;
- for (i = 0; i <
=
ARRAY_SIZE(func_limit); i++) {
+ for (i = 0; i < ARRAY_SIZE(func_limit); i++) {
bool_map = (map->map_type == func_limit[i].map_type);
bool_func = (func_id == func_limit[i].func_id);
/* only when map & func pair match it can continue.