diff options
author | Roman Gushchin <guro@fb.com> | 2018-09-28 10:45:46 -0400 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-10-01 10:18:33 -0400 |
commit | c6fdcd6e0cc4dc316e3eb261025fb0abd69540b9 (patch) | |
tree | 2ba97812bcd679f80ed3473c1354e2d1f7c8b862 /kernel/bpf | |
parent | b741f1630346defcbc8cc60f1a2bdae8b3b0036f (diff) |
bpf: don't allow create maps of per-cpu cgroup local storages
Explicitly forbid creating map of per-cpu cgroup local storages.
This behavior matches the behavior of shared cgroup storages.
Signed-off-by: Roman Gushchin <guro@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/map_in_map.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/map_in_map.c b/kernel/bpf/map_in_map.c index 3bfbf4464416..99d243e1ad6e 100644 --- a/kernel/bpf/map_in_map.c +++ b/kernel/bpf/map_in_map.c | |||
@@ -24,7 +24,8 @@ struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd) | |||
24 | * in the verifier is not enough. | 24 | * in the verifier is not enough. |
25 | */ | 25 | */ |
26 | if (inner_map->map_type == BPF_MAP_TYPE_PROG_ARRAY || | 26 | if (inner_map->map_type == BPF_MAP_TYPE_PROG_ARRAY || |
27 | inner_map->map_type == BPF_MAP_TYPE_CGROUP_STORAGE) { | 27 | inner_map->map_type == BPF_MAP_TYPE_CGROUP_STORAGE || |
28 | inner_map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE) { | ||
28 | fdput(f); | 29 | fdput(f); |
29 | return ERR_PTR(-ENOTSUPP); | 30 | return ERR_PTR(-ENOTSUPP); |
30 | } | 31 | } |