diff options
author | Yonghong Song <yhs@fb.com> | 2020-08-19 01:23:10 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-08-19 03:36:23 +0300 |
commit | e60572b8d4c39572be6857d1ec91fdf979f8775f (patch) | |
tree | d4ab349e5c3baa0fb8f2f82ba9dd804e74ada523 /tools/bpf/bpftool/pids.c | |
parent | e679654a704e5bd676ea6446fa7b764cbabf168a (diff) | |
download | linux-e60572b8d4c39572be6857d1ec91fdf979f8775f.tar.xz |
bpf: Avoid visit same object multiple times
Currently when traversing all tasks, the next tid
is always increased by one. This may result in
visiting the same task multiple times in a
pid namespace.
This patch fixed the issue by seting the next
tid as pid_nr_ns(pid, ns) + 1, similar to
funciton next_tgid().
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Link: https://lore.kernel.org/bpf/20200818222310.2181500-1-yhs@fb.com
Diffstat (limited to 'tools/bpf/bpftool/pids.c')
0 files changed, 0 insertions, 0 deletions