Skip to content
Commit ef2734e5 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Sasha Levin
Browse files

getrusage: use __for_each_thread()

[ Upstream commit 13b7bc60

 ]

do/while_each_thread should be avoided when possible.

Plus this change allows to avoid lock_task_sighand(), we can use rcu
and/or sig->stats_lock instead.

Link: https://lkml.kernel.org/r/20230909172629.GA20454@redhat.com
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Stable-dep-of: f7ec1cd5

 ("getrusage: use sig->stats_lock rather than lock_task_sighand()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 18c7394e
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