aboutsummaryrefslogtreecommitdiff
path: root/kernel/bpf/hashtab.c
diff options
context:
space:
mode:
authorGravatar David S. Miller <davem@davemloft.net> 2017-01-11 14:43:39 -0500
committerGravatar David S. Miller <davem@davemloft.net> 2017-01-11 14:43:39 -0500
commit02ac5d1487115d160fab4c3e61b7edc20a945af9 (patch)
tree08a39341379ce6f1ad4f3997df36c76ee82cee9c /kernel/bpf/hashtab.c
parentMerge branch 'cls_flower-ARP' (diff)
parentMerge branch 'akpm' (patches from Andrew) (diff)
downloadlinux-02ac5d1487115d160fab4c3e61b7edc20a945af9.tar.gz
linux-02ac5d1487115d160fab4c3e61b7edc20a945af9.tar.bz2
linux-02ac5d1487115d160fab4c3e61b7edc20a945af9.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two AF_* families adding entries to the lockdep tables at the same time. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/hashtab.c')
-rw-r--r--kernel/bpf/hashtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index 34debc1a9641..3f2bb58952d8 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -274,7 +274,7 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
*/
goto free_htab;
- if (htab->map.value_size >= (1 << (KMALLOC_SHIFT_MAX - 1)) -
+ if (htab->map.value_size >= KMALLOC_MAX_SIZE -
MAX_BPF_STACK - sizeof(struct htab_elem))
/* if value_size is bigger, the user space won't be able to
* access the elements via bpf syscall. This check also makes