summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2018-02-21 20:39:22 +0100
committerTejun Heo <tj@kernel.org>2018-02-21 20:39:22 +0100
commitd1897c9538edafd4ae6bbd03cc075962ddde2c21 (patch)
tree96b73265ed9e288fdcd2d153c3e045ef83ec916e /arch
parentsched, cgroup: Don't reject lower cpu.max on ancestors (diff)
downloadlinux-d1897c9538edafd4ae6bbd03cc075962ddde2c21.tar.xz
linux-d1897c9538edafd4ae6bbd03cc075962ddde2c21.zip
cgroup: fix rule checking for threaded mode switching
A domain cgroup isn't allowed to be turned threaded if its subtree is populated or domain controllers are enabled. cgroup_enable_threaded() depended on cgroup_can_be_thread_root() test to enforce this rule. A parent which has populated domain descendants or have domain controllers enabled can't become a thread root, so the above rules are enforced automatically. However, for the root cgroup which can host mixed domain and threaded children, cgroup_can_be_thread_root() doesn't check any of those conditions and thus first level cgroups ends up escaping those rules. This patch fixes the bug by adding explicit checks for those rules in cgroup_enable_threaded(). Reported-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Fixes: 8cfd8147df67 ("cgroup: implement cgroup v2 thread support") Cc: stable@vger.kernel.org # v4.14+
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions