diff options
| author | 2017-11-28 08:12:32 -0800 | |
|---|---|---|
| committer | 2017-11-28 08:12:32 -0800 | |
| commit | bc686442f8a601bccac1f22506ecdb4b0d62cadd (patch) | |
| tree | b224ab4aa2350b233da640f5850f48bc6bfeb2d0 /kernel/bpf/stackmap.c | |
| parent | ARM: dts: Add remote-wakeup-connected for omap OHCI (diff) | |
| parent | ARM: dts: am437x-cm-t43: Correct the dmas property of spi0 (diff) | |
Merge branch 'dts-fixes' into omap-for-v4.15/fixes-dt
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 */ |
