diff options
author | David S. Miller <davem@davemloft.net> | 2016-07-01 16:00:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-01 16:00:52 -0400 |
commit | 6bd3847bdc3ba97e642cb9af9d16b0f056da31a2 (patch) | |
tree | 31d2c41c7af6991401c3aff11e7ade3317b4a614 /include | |
parent | 466fc793da3aea0caf365e7fadc67473e4cdaa80 (diff) | |
parent | 113214be7f6c98dd6d0435e4765aea8dea91662c (diff) |
Merge branch 'bpf-robustify'
Daniel Borkmann says:
====================
Further robustify putting BPF progs
This series addresses a potential issue reported to us by Jann Horn
with regards to putting progs. First patch moves progs generally under
RCU destruction and second patch refactors getting of progs to simplify
code a bit. For details, please see individual patches. Note, we think
that addressing this one in net-next should be sufficient.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/bpf.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 8411032ac90d..b3336b4f5d04 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -218,9 +218,9 @@ void bpf_register_prog_type(struct bpf_prog_type_list *tl); void bpf_register_map_type(struct bpf_map_type_list *tl); struct bpf_prog *bpf_prog_get(u32 ufd); +struct bpf_prog *bpf_prog_get_type(u32 ufd, enum bpf_prog_type type); struct bpf_prog *bpf_prog_inc(struct bpf_prog *prog); void bpf_prog_put(struct bpf_prog *prog); -void bpf_prog_put_rcu(struct bpf_prog *prog); struct bpf_map *bpf_map_get_with_uref(u32 ufd); struct bpf_map *__bpf_map_get(struct fd f); @@ -278,11 +278,13 @@ static inline struct bpf_prog *bpf_prog_get(u32 ufd) return ERR_PTR(-EOPNOTSUPP); } -static inline void bpf_prog_put(struct bpf_prog *prog) +static inline struct bpf_prog *bpf_prog_get_type(u32 ufd, + enum bpf_prog_type type) { + return ERR_PTR(-EOPNOTSUPP); } -static inline void bpf_prog_put_rcu(struct bpf_prog *prog) +static inline void bpf_prog_put(struct bpf_prog *prog) { } #endif /* CONFIG_BPF_SYSCALL */ |