Commit 87abbf7a authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Alexei Starovoitov

bpf: task_group_seq_get_next: fix the skip_if_dup_files check

Unless I am notally confused it is wrong. We are going to return or
skip next_task so we need to check next_task-files, not task->files.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230905154651.GA24940@redhat.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 49819213
......@@ -82,7 +82,7 @@ static struct task_struct *task_group_seq_get_next(struct bpf_iter_seq_task_comm
common->pid_visiting = *tid;
if (skip_if_dup_files && task->files == task->group_leader->files) {
if (skip_if_dup_files && next_task->files == next_task->group_leader->files) {
task = next_task;
goto retry;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment