]> git.hungrycats.org Git - linux/commit
cpuset: initialize effective masks when clone_children is enabled
authorZefan Li <lizefan@huawei.com>
Fri, 13 Feb 2015 03:19:49 +0000 (11:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 12:59:42 +0000 (13:59 +0100)
commitfbbca5e8cc61da1665212b97745b9898eeab8045
treeaf6beb51609ebd09155f82698911eb29159c126f
parent0dab26655a339605c62387405d83ad02a4f25a1f
cpuset: initialize effective masks when clone_children is enabled

commit 790317e1b266c776765a4bdcedefea706ff0fada upstream.

If clone_children is enabled, effective masks won't be initialized
due to the bug:

  # mount -t cgroup -o cpuset xxx /mnt
  # echo 1 > cgroup.clone_children
  # mkdir /mnt/tmp
  # cat /mnt/tmp/
  # cat cpuset.effective_cpus

  # cat cpuset.cpus
  0-15

And then this cpuset won't constrain the tasks in it.

Either the bug or the fix has no effect on unified hierarchy, as
there's no clone_chidren flag there any more.

Reported-by: Christian Brauner <christianvanbrauner@gmail.com>
Reported-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Tested-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cpuset.c