diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-12-06 22:39:39 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-12-06 22:39:39 +0100 |
commit | d6eabce2577a695197e9433302fd6a9f0e1a7666 (patch) | |
tree | e5c5bcc7803879d5d911cc8faeb74a946c242395 /kernel/bpf/arraymap.c | |
parent | 6e948c67c47211afcc65c9ccdeedbd5db5c57077 (diff) | |
parent | 328b4ed93b69a6f2083d52f31a240a09e5de386a (diff) |
Merge branch 'linus' into perf/urgent, to synchronize UAPI headers
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r-- | kernel/bpf/arraymap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c index c4b9ab01bba5..7c25426d3cf5 100644 --- a/kernel/bpf/arraymap.c +++ b/kernel/bpf/arraymap.c @@ -19,6 +19,9 @@ #include "map_in_map.h" +#define ARRAY_CREATE_FLAG_MASK \ + (BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY) + static void bpf_array_free_percpu(struct bpf_array *array) { int i; @@ -56,7 +59,8 @@ static struct bpf_map *array_map_alloc(union bpf_attr *attr) /* check sanity of attributes */ if (attr->max_entries == 0 || attr->key_size != 4 || - attr->value_size == 0 || attr->map_flags & ~BPF_F_NUMA_NODE || + attr->value_size == 0 || + attr->map_flags & ~ARRAY_CREATE_FLAG_MASK || (percpu && numa_node != NUMA_NO_NODE)) return ERR_PTR(-EINVAL); |