diff options
author | Yi Tao <escape@linux.alibaba.com> | 2025-09-10 14:59:34 +0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-09-10 07:31:09 -1000 |
commit | 477abc2ec889a9dd3eb4ae0adbf6408a569bf2b6 (patch) | |
tree | 8b22756d3cae591a2707fa442a6859698e7e4927 /rust/helpers/task.c | |
parent | a1ffc8ad3165fa1cf6a60c6a4b4e00dfd6603cf2 (diff) |
cgroup: relocate cgroup_attach_lock within cgroup_procs_write_start
Later patches will introduce a new parameter `task` to
cgroup_attach_lock, thus adjusting the position of cgroup_attach_lock
within cgroup_procs_write_start.
Between obtaining the threadgroup leader via PID and acquiring the
cgroup attach lock, the threadgroup leader may change, which could lead
to incorrect cgroup migration. Therefore, after acquiring the cgroup
attach lock, we check whether the threadgroup leader has changed, and if
so, retry the operation.
tj: Minor comment adjustments.
Signed-off-by: Yi Tao <escape@linux.alibaba.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions