OSDN Git Service

bpf: Do not allow map_freeze in struct_ops map
authorMartin KaFai Lau <kafai@fb.com>
Thu, 5 Mar 2020 01:34:54 +0000 (17:34 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 5 Mar 2020 22:15:49 +0000 (14:15 -0800)
commit849b4d94582a966ecb533448415462846da1f0fa
tree05c047714baaed5bea5da823c7d391ea3f00185b
parent8e5290e710f4ffe8e9f8813e2ed0397a94d7b2f1
bpf: Do not allow map_freeze in struct_ops map

struct_ops map cannot support map_freeze.  Otherwise, a struct_ops
cannot be unregistered from the subsystem.

Fixes: 85d33df357b6 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200305013454.535397-1-kafai@fb.com
kernel/bpf/syscall.c