|
@@ -274,7 +274,7 @@ static struct bpf_map *htab_map_alloc(union bpf_attr *attr)
|
|
*/
|
|
*/
|
|
goto free_htab;
|
|
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))
|
|
MAX_BPF_STACK - sizeof(struct htab_elem))
|
|
/* if value_size is bigger, the user space won't be able to
|
|
/* if value_size is bigger, the user space won't be able to
|
|
* access the elements via bpf syscall. This check also makes
|
|
* access the elements via bpf syscall. This check also makes
|