aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/queue_stack_maps.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/bpf/queue_stack_maps.c')
-rw-r--r--kernel/bpf/queue_stack_maps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/bpf/queue_stack_maps.c b/kernel/bpf/queue_stack_maps.c
index b384ea9f3254..0b140d236889 100644
--- a/kernel/bpf/queue_stack_maps.c
+++ b/kernel/bpf/queue_stack_maps.c
@@ -11,8 +11,7 @@
11#include "percpu_freelist.h" 11#include "percpu_freelist.h"
12 12
13#define QUEUE_STACK_CREATE_FLAG_MASK \ 13#define QUEUE_STACK_CREATE_FLAG_MASK \
14 (BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY) 14 (BPF_F_NUMA_NODE | BPF_F_ACCESS_MASK)
15
16 15
17struct bpf_queue_stack { 16struct bpf_queue_stack {
18 struct bpf_map map; 17 struct bpf_map map;
@@ -52,7 +51,8 @@ static int queue_stack_map_alloc_check(union bpf_attr *attr)
52 /* check sanity of attributes */ 51 /* check sanity of attributes */
53 if (attr->max_entries == 0 || attr->key_size != 0 || 52 if (attr->max_entries == 0 || attr->key_size != 0 ||
54 attr->value_size == 0 || 53 attr->value_size == 0 ||
55 attr->map_flags & ~QUEUE_STACK_CREATE_FLAG_MASK) 54 attr->map_flags & ~QUEUE_STACK_CREATE_FLAG_MASK ||
55 !bpf_map_flags_access_ok(attr->map_flags))
56 return -EINVAL; 56 return -EINVAL;
57 57
58 if (attr->value_size > KMALLOC_MAX_SIZE) 58 if (attr->value_size > KMALLOC_MAX_SIZE)