summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-05-05 10:01:34 +0200
committerIngo Molnar <mingo@kernel.org>2018-05-05 10:01:34 +0200
commit12e2c41148a9e68bc3b261954961db9d28decf47 (patch)
tree6b52bbd4b222f3995090320b08a54fece5a12d48 /kernel/bpf/arraymap.c
parentlocking/mutex: Optimize __mutex_trylock_fast() (diff)
parentMerge tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/ke... (diff)
downloadlinux-12e2c41148a9e68bc3b261954961db9d28decf47.tar.xz
linux-12e2c41148a9e68bc3b261954961db9d28decf47.zip
Merge branch 'linus' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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)
}
/* decrement refcnt of all bpf_progs that are stored in this map */
-void bpf_fd_array_map_clear(struct bpf_map *map)
+static void bpf_fd_array_map_clear(struct bpf_map *map)
{
struct bpf_array *array = container_of(map, struct bpf_array, map);
int i;
@@ -495,6 +495,7 @@ const struct bpf_map_ops prog_array_map_ops = {
.map_fd_get_ptr = prog_fd_array_get_ptr,
.map_fd_put_ptr = prog_fd_array_put_ptr,
.map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem,
+ .map_release_uref = bpf_fd_array_map_clear,
};
static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file,