cpuset: make sure new tasks conform to the current config of the cpuset
authorZefan Li <lizefan@huawei.com>
Tue, 9 Aug 2016 03:25:01 +0000 (11:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:39 +0000 (10:07 +0200)
commit06ec7a1d7646833cac76516fe78a23577cdb4a8a
treeff51adf895a7bbfeda42db07eea7b3d5c25370d7
parente43dccac6393653706ef7486d3261f21563cf997
cpuset: make sure new tasks conform to the current config of the cpuset

commit 06f4e94898918bcad00cdd4d349313a439d6911e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cpuset.c