projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bpf: btf: Check array t->size
[linux-2.6-block.git]
/
kernel
/
bpf
/
btf.c
diff --git
a/kernel/bpf/btf.c
b/kernel/bpf/btf.c
index 3d20aa1f4b543194a34724f193ae8f78df016222..84ad532f28547c2a96c5998ec9a79422bc37503d 100644
(file)
--- a/
kernel/bpf/btf.c
+++ b/
kernel/bpf/btf.c
@@
-1342,6
+1342,11
@@
static s32 btf_array_check_meta(struct btf_verifier_env *env,
return -EINVAL;
}
+ if (t->size) {
+ btf_verifier_log_type(env, t, "size != 0");
+ return -EINVAL;
+ }
+
/* Array elem type and index type cannot be in type void,
* so !array->type and !array->index_type are not allowed.
*/