diff options
author | David S. Miller <davem@davemloft.net> | 2017-01-11 14:43:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-11 14:43:39 -0500 |
commit | 02ac5d1487115d160fab4c3e61b7edc20a945af9 (patch) | |
tree | 08a39341379ce6f1ad4f3997df36c76ee82cee9c /kernel/bpf/hashtab.c | |
parent | Merge branch 'cls_flower-ARP' (diff) | |
parent | Merge branch 'akpm' (patches from Andrew) (diff) | |
download | linux-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.c | 2 |
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 |