aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-04-25 22:55:33 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-25 22:55:33 -0400
commit25eb0ea7174c6e84f21fa59dccbddd0318b17b12 (patch)
tree07ecdbd7810e448e3b744c0ef143480a6c4e129d /kernel/bpf/arraymap.c
parent91a825290ca4eae88603bc811bf74a45f94a3f46 (diff)
parent9c299a32ede98dc9faafb267034ed830a15304db (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2018-04-25 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix to clear the percpu metadata_dst that could otherwise carry stale ip_tunnel_info, from William. 2) Fix that reduces the number of passes in x64 JIT with regards to dead code sanitation to avoid risk of prog rejection, from Gianluca. 3) Several fixes of sockmap programs, besides others, fixing a double page_put() in error path, missing refcount hold for pinned sockmap, adding required -target bpf for clang in sample Makefile, from John. 4) Fix to disable preemption in __BPF_PROG_RUN_ARRAY() paths, from Roman. 5) Fix tools/bpf/ Makefile with regards to a lex/yacc build error seen on older gcc-5, from John. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r--kernel/bpf/arraymap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 14750e7c5ee4..027107f4be53 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -476,7 +476,7 @@ static u32 prog_fd_array_sys_lookup_elem(void *ptr)
476} 476}
477 477
478/* decrement refcnt of all bpf_progs that are stored in this map */ 478/* decrement refcnt of all bpf_progs that are stored in this map */
479void bpf_fd_array_map_clear(struct bpf_map *map) 479static void bpf_fd_array_map_clear(struct bpf_map *map)
480{ 480{
481 struct bpf_array *array = container_of(map, struct bpf_array, map); 481 struct bpf_array *array = container_of(map, struct bpf_array, map);
482 int i; 482 int i;
@@ -495,6 +495,7 @@ const struct bpf_map_ops prog_array_map_ops = {
495 .map_fd_get_ptr = prog_fd_array_get_ptr, 495 .map_fd_get_ptr = prog_fd_array_get_ptr,
496 .map_fd_put_ptr = prog_fd_array_put_ptr, 496 .map_fd_put_ptr = prog_fd_array_put_ptr,
497 .map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem, 497 .map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem,
498 .map_release_uref = bpf_fd_array_map_clear,
498}; 499};
499 500
500static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file, 501static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file,