summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/bpf_iter.c
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2020-07-23 11:41:10 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-07-25 20:16:32 -0700
commitf9c792729581bd8b8473af163e8ab426c2c61d89 (patch)
tree2b5ff0209c3cb3cd0ab98a145c3541ce40c11017 /kernel/bpf/bpf_iter.c
parent14fc6bd6b79c430f615500d0fe6cea4722110db8 (diff)
bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t
This patch refactored target bpf_iter_init_seq_priv_t callback function to accept additional information. This will be needed in later patches for map element targets since a particular map should be passed to traverse elements for that particular map. In the future, other information may be passed to target as well, e.g., pid, cgroup id, etc. to customize the iterator. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200723184110.590156-1-yhs@fb.com
Diffstat (limited to 'kernel/bpf/bpf_iter.c')
-rw-r--r--kernel/bpf/bpf_iter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/bpf_iter.c b/kernel/bpf/bpf_iter.c
index 5b2387d6aa1f..8fa94cb1b5a0 100644
--- a/kernel/bpf/bpf_iter.c
+++ b/kernel/bpf/bpf_iter.c
@@ -442,7 +442,7 @@ static int prepare_seq_file(struct file *file, struct bpf_iter_link *link)
}
if (tinfo->reg_info->seq_info->init_seq_private) {
- err = tinfo->reg_info->seq_info->init_seq_private(priv_data->target_private);
+ err = tinfo->reg_info->seq_info->init_seq_private(priv_data->target_private, NULL);
if (err)
goto release_seq_file;
}