diff options
author | Oleg Nesterov <oleg@redhat.com> | 2023-09-05 17:46:51 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-09-08 17:42:19 +0200 |
commit | 87abbf7a54f6c9c51374b0701cd7ab47534516ae (patch) | |
tree | 538e858fc2339206d956a649d68648f62f7910d9 /kernel/bpf/task_iter.c | |
parent | bpf: task_group_seq_get_next: cleanup the usage of get/put_task_struct (diff) | |
download | linux-87abbf7a54f6c9c51374b0701cd7ab47534516ae.tar.xz linux-87abbf7a54f6c9c51374b0701cd7ab47534516ae.zip |
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: Oleg Nesterov <oleg@redhat.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230905154651.GA24940@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/task_iter.c')
-rw-r--r-- | kernel/bpf/task_iter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c index 1589ec3faded..2264870ae3fc 100644 --- a/kernel/bpf/task_iter.c +++ b/kernel/bpf/task_iter.c @@ -82,7 +82,7 @@ retry: 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; } |