From 6432a58d1b11eb48c2cb381064e311e8a8498732 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Tue, 17 Oct 2017 19:09:56 +0800 Subject: [PATCH] Revert "cgroup: Change from CAP_SYS_NICE to CAP_SYS_RESOURCE for cgroup migration permissions" This reverts commit 273daee0be36235886622396eedb618fc5de0213. Needs to be reverted since system_server no longer has CAP_SYS_RESOURCE. Change-Id: I121ac09db2f4f55349d1596c14315b98d246b3d7 Signed-off-by: Tao Huang --- kernel/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 16d5b7a46850..e56763b1f8d9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2687,7 +2687,7 @@ static int cgroup_procs_write_permission(struct task_struct *task, if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && !uid_eq(cred->euid, tcred->uid) && !uid_eq(cred->euid, tcred->suid) && - !ns_capable(tcred->user_ns, CAP_SYS_RESOURCE)) + !ns_capable(tcred->user_ns, CAP_SYS_NICE)) ret = -EACCES; if (!ret && cgroup_on_dfl(dst_cgrp)) {