diff options
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 2 |
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) | |||
56 | attr->value_size == 0 || attr->map_flags) | 56 | attr->value_size == 0 || attr->map_flags) |
57 | return ERR_PTR(-EINVAL); | 57 | return ERR_PTR(-EINVAL); |
58 | 58 | ||
59 | if (attr->value_size >= 1 << (KMALLOC_SHIFT_MAX - 1)) | 59 | if (attr->value_size > KMALLOC_MAX_SIZE) |
60 | /* if value_size is bigger, the user space won't be able to | 60 | /* if value_size is bigger, the user space won't be able to |
61 | * access the elements. | 61 | * access the elements. |
62 | */ | 62 | */ |