diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 17:01:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-16 17:01:44 +0100 |
commit | 39461ffdfc974147ad0f3cc0da397a999adc25b1 (patch) | |
tree | 7358951dcc952436cfa09072f376637c6f807984 /kernel/bpf/hashtab.c | |
parent | b0f2d7d546d37697d3f50753904f6f0c549b62bc (diff) | |
parent | 49def1853334396f948dcb4cedb9347abb318df5 (diff) | |
download | talos-obmc-linux-39461ffdfc974147ad0f3cc0da397a999adc25b1.tar.gz talos-obmc-linux-39461ffdfc974147ad0f3cc0da397a999adc25b1.zip |
Merge 4.10-rc4 into char-misc-next
We want the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 |