Message ID | 20230905154646.GA24928@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f9aedd66c46ba6e3006a9eba5b91cb67f0114795 |
Delegated to: | BPF |
Headers | show |
Series | bpf: task_group_seq_get_next: misc cleanups | expand |
diff --git a/kernel/bpf/task_iter.c b/kernel/bpf/task_iter.c index c4ab9d6cdbe9..4d1125108014 100644 --- a/kernel/bpf/task_iter.c +++ b/kernel/bpf/task_iter.c @@ -75,15 +75,8 @@ static struct task_struct *task_group_seq_get_next(struct bpf_iter_seq_task_comm return NULL; retry: - if (!pid_alive(task)) { - put_task_struct(task); - return NULL; - } - next_task = next_thread(task); put_task_struct(task); - if (!next_task) - return NULL; saved_tid = *tid; *tid = __task_pid_nr_ns(next_task, PIDTYPE_PID, common->ns);