cpuset: make sure new tasks conform to the current config of the cpuset

[ Upstream commit 06f4e94898 ]

A new task inherits cpus_allowed and mems_allowed masks from its parent,
but if someone changes cpuset's config by writing to cpuset.cpus/cpuset.mems
before this new task is inserted into the cgroup's task list, the new task
won't be updated accordingly.

Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
This commit is contained in:
Zefan Li 2016-08-09 11:25:01 +08:00 • committed by Sasha Levin
commit 87fe0cd807