File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr)
53
53
54
54
/* check sanity of attributes */
55
55
if (attr -> max_entries == 0 || attr -> key_size != 4 ||
56
- attr -> value_size == 0 )
56
+ attr -> value_size == 0 || attr -> map_flags )
57
57
return ERR_PTR (- EINVAL );
58
58
59
59
if (attr -> value_size >= 1 << (KMALLOC_SHIFT_MAX - 1 ))
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ static struct bpf_map *stack_map_alloc(union bpf_attr *attr)
35
35
if (!capable (CAP_SYS_ADMIN ))
36
36
return ERR_PTR (- EPERM );
37
37
38
+ if (attr -> map_flags )
39
+ return ERR_PTR (- EINVAL );
40
+
38
41
/* check sanity of attributes */
39
42
if (attr -> max_entries == 0 || attr -> key_size != 4 ||
40
43
value_size < 8 || value_size % 8 ||
You can’t perform that action at this time.
0 commit comments