Re: [PATCH] bpf: task_group_seq_get_next: cleanup the usage of next_thread()
From: Oleg Nesterov
Date: Fri Aug 25 2023 - 09:53:18 EST
On 08/25, Eric W. Biederman wrote:
>
> For the record I find this code confusing, and wrong.
Oh, yes...
> and has
> a built in race condition which means it could wind up iterating through
> a different process.
Yes, common->pid and/or common->pid_visiting can be reused
but I am not going to try to fix this ;)
> Acked-by: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Thanks!
Oleg.