Re: [PATCH] cgroup: Reinit cgroup_taskset structure before cgroup_migrate_execute() returns

From: Tejun Heo
Date: Fri Sep 22 2017 - 11:17:01 EST


On Thu, Sep 21, 2017 at 09:54:13AM -0400, Waiman Long wrote:
...
> To allow reuse of the cgroup_mgctx structure, some fields in that
> structure are now re-initialized at the end of cgroup_migrate_execute()
> function call so that the structure can be reused again in a later
> iteration without causing problem.
>
> This bug was introduced in the commit e595cd706982 ("group: track
> migration context in cgroup_mgctx") in 4.11. This commit moves the
> cgroup_taskset initialization out of cgroup_migrate(). The commit
> 10467270fb3 ("cgroup: don't call migration methods if there are no
> tasks to migrate") helped, but did not completely resolve the problem.
>
> Fixes: e595cd706982bff0211e6fafe5a108421e747fbc ("group: track migration context in cgroup_mgctx")
> Signed-off-by: Waiman Long <longman@xxxxxxxxxx>

Applied to cgroup/for-4.14-fixes.

Thanks, Waiman!

--
tejun