diff options
author | 2014-11-18 17:32:16 -0800 | |
---|---|---|
committer | 2014-11-19 15:40:00 -0500 | |
commit | daaf427c6ab392bedcd018e326b2ffa1e1110cd6 (patch) | |
tree | 48b565eb6791a0e49f42dccb6a2873f94492280c /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | netlink: Deletion of an unnecessary check before the function call "__module_get" (diff) | |
download | linux-dev-daaf427c6ab392bedcd018e326b2ffa1e1110cd6.tar.xz linux-dev-daaf427c6ab392bedcd018e326b2ffa1e1110cd6.zip |
bpf: fix arraymap NULL deref and missing overflow and zero size checks
- fix NULL pointer dereference:
kernel/bpf/arraymap.c:41 array_map_alloc() error: potential null dereference 'array'. (kzalloc returns null)
kernel/bpf/arraymap.c:41 array_map_alloc() error: we previously assumed 'array' could be null (see line 40)
- integer overflow check was missing in arraymap
(hashmap checks for overflow via kmalloc_array())
- arraymap can round_up(value_size, 8) to zero. check was missing.
- hashmap was missing zero size check as well, since roundup_pow_of_two() can
truncate into zero
- found a typo in the arraymap comment and unnecessary empty line
Fix all of these issues and make both overflow checks explicit U32 in size.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions