diff options
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index de464e6683b6..83d1926c61e4 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
@@ -40,6 +40,7 @@ struct bpf_map { | |||
40 | struct user_struct *user; | 40 | struct user_struct *user; |
41 | const struct bpf_map_ops *ops; | 41 | const struct bpf_map_ops *ops; |
42 | struct work_struct work; | 42 | struct work_struct work; |
43 | atomic_t usercnt; | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | struct bpf_map_type_list { | 46 | struct bpf_map_type_list { |
@@ -167,8 +168,10 @@ struct bpf_prog *bpf_prog_get(u32 ufd); | |||
167 | void bpf_prog_put(struct bpf_prog *prog); | 168 | void bpf_prog_put(struct bpf_prog *prog); |
168 | void bpf_prog_put_rcu(struct bpf_prog *prog); | 169 | void bpf_prog_put_rcu(struct bpf_prog *prog); |
169 | 170 | ||
170 | struct bpf_map *bpf_map_get(u32 ufd); | 171 | struct bpf_map *bpf_map_get_with_uref(u32 ufd); |
171 | struct bpf_map *__bpf_map_get(struct fd f); | 172 | struct bpf_map *__bpf_map_get(struct fd f); |
173 | void bpf_map_inc(struct bpf_map *map, bool uref); | ||
174 | void bpf_map_put_with_uref(struct bpf_map *map); | ||
172 | void bpf_map_put(struct bpf_map *map); | 175 | void bpf_map_put(struct bpf_map *map); |
173 | 176 | ||
174 | extern int sysctl_unprivileged_bpf_disabled; | 177 | extern int sysctl_unprivileged_bpf_disabled; |