summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-01-25 15:52:46 +0100
committerIngo Molnar <mingo@kernel.org>2017-01-25 15:52:46 +0100
commit47cd95a6326888a46e7ce8389cd394a3e1c647e7 (patch)
treedfbb526bcca1a4f627294f19983e1f0b43af9204 /kernel/bpf/arraymap.c
parent9f6f941e25bad8fcffc24d10762962d62edba767 (diff)
parent883af14e67e8b8702b5560aa64c888c0cd0bd66c (diff)
downloadlinux-47cd95a6326888a46e7ce8389cd394a3e1c647e7.tar.gz
linux-47cd95a6326888a46e7ce8389cd394a3e1c647e7.zip
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r--kernel/bpf/arraymap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index a2ac051c342f..229a5d5df977 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -56,7 +56,7 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr)
attr->value_size == 0 || attr->map_flags)
return ERR_PTR(-EINVAL);
- if (attr->value_size >= 1 << (KMALLOC_SHIFT_MAX - 1))
+ if (attr->value_size > KMALLOC_MAX_SIZE)
/* if value_size is bigger, the user space won't be able to
* access the elements.
*/