diff options
| author | Mark Brown <broonie@kernel.org> | 2018-01-25 18:16:26 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2018-01-25 18:16:26 +0000 |
| commit | 0b5eca67bd2d0e6f6d0ccdc316aced0cc4bf2e9f (patch) | |
| tree | b6597ffe774a67ab5b8eebd57c9a723732d3a39c /kernel/bpf/stackmap.c | |
| parent | 3bb0f7c31b1aedd0f85c675297031281799145d7 (diff) | |
| parent | 93a00c467fe998bf5716cbc9cabc127046054782 (diff) | |
| download | linux-0b5eca67bd2d0e6f6d0ccdc316aced0cc4bf2e9f.tar.gz linux-0b5eca67bd2d0e6f6d0ccdc316aced0cc4bf2e9f.tar.bz2 linux-0b5eca67bd2d0e6f6d0ccdc316aced0cc4bf2e9f.zip | |
Merge branches 'topic/twl4030' and 'topic/twl6040' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-twl-breakage
Diffstat (limited to 'kernel/bpf/stackmap.c')
| -rw-r--r-- | kernel/bpf/stackmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index 135be433e9a0..a15bc636cc98 100644 --- a/kernel/bpf/stackmap.c +++ b/kernel/bpf/stackmap.c @@ -11,6 +11,9 @@ #include <linux/perf_event.h> #include "percpu_freelist.h" +#define STACK_CREATE_FLAG_MASK \ + (BPF_F_NUMA_NODE | BPF_F_RDONLY | BPF_F_WRONLY) + struct stack_map_bucket { struct pcpu_freelist_node fnode; u32 hash; @@ -60,7 +63,7 @@ static struct bpf_map *stack_map_alloc(union bpf_attr *attr) if (!capable(CAP_SYS_ADMIN)) return ERR_PTR(-EPERM); - if (attr->map_flags & ~BPF_F_NUMA_NODE) + if (attr->map_flags & ~STACK_CREATE_FLAG_MASK) return ERR_PTR(-EINVAL); /* check sanity of attributes */ |
