CHROMIUM: cgroups: relax permissions on moving tasks between cgroups
authorDmitry Torokhov <dtor@chromium.org>
Thu, 6 Oct 2016 23:14:16 +0000 (16:14 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 18 Dec 2017 15:41:22 +0000 (21:11 +0530)
commit86e76eb71fa600bf92f78c65bd2c05c860af1c2f
tree2b1d183b0fb6c0d809d978adbcdece1b58386306
parent4803def4e0b2b40686fcbcc569495d330148cefb
CHROMIUM: cgroups: relax permissions on moving tasks between cgroups

Android expects system_server to be able to move tasks between different
cgroups/cpusets, but does not want to be running as root. Let's relax
permission check so that processes can move other tasks if they have
CAP_SYS_NICE in the affected task's user namespace.

BUG=b:31790445,chromium:647994
TEST=Boot android container, examine logcat

Change-Id: Ia919c66ab6ed6a6daf7c4cf67feb38b13b1ad09b
Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/394927
Reviewed-by: Ricky Zhou <rickyz@chromium.org>
[AmitP: Refactored original changes to align with upstream commit
        201af4c0fab0 ("cgroup: move cgroup files under kernel/cgroup/")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
kernel/cgroup/cgroup-v1.c