diff options
author | Ingo Molnar <mingo@kernel.org> | 2021-02-17 14:04:39 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-02-17 14:04:39 +0100 |
commit | ed3cd45f8ca873dd320ff7e6b4c1c8f83a65302c (patch) | |
tree | 783a02c1e78964654fe6d9a9c14b24bfc50e6b3b /kernel/bpf/task_iter.c | |
parent | sched/fair: Move avg_scan_cost calculations under SIS_PROP (diff) | |
parent | Linux 5.11 (diff) | |
download | linux-ed3cd45f8ca873dd320ff7e6b4c1c8f83a65302c.tar.xz linux-ed3cd45f8ca873dd320ff7e6b4c1c8f83a65302c.zip |
Merge tag 'v5.11' into sched/core, to pick up fixes & refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/bpf/task_iter.c')
-rw-r--r-- | kernel/bpf/task_iter.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c index e73c07593024..175b7b42bfc4 100644 --- a/kernel/bpf/task_iter.c +++ b/kernel/bpf/task_iter.c @@ -37,7 +37,7 @@ retry: if (!task) { ++*tid; goto retry; - } else if (skip_if_dup_files && task->tgid != task->pid && + } else if (skip_if_dup_files && !thread_group_leader(task) && task->files == task->group_leader->files) { put_task_struct(task); task = NULL; @@ -151,13 +151,14 @@ again: curr_task = info->task; curr_fd = info->fd; } else { - curr_task = task_seq_get_next(ns, &curr_tid, true); - if (!curr_task) { - info->task = NULL; - return NULL; - } - - /* set info->task and info->tid */ + curr_task = task_seq_get_next(ns, &curr_tid, true); + if (!curr_task) { + info->task = NULL; + info->tid = curr_tid; + return NULL; + } + + /* set info->task and info->tid */ info->task = curr_task; if (curr_tid == info->tid) { curr_fd = info->fd; |