diff --git a/[refs] b/[refs] index 1b78ca232434..41865b4cd204 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8751e03958f2adbfba6a0f186f4c5797c950c22a +refs/heads/master: 14a590c3f987977d7b09ec926481ee0238c08eee diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index 7a5ccb2e9e0f..d24cc75caf65 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -865,7 +865,6 @@ config UIDGID_CONVERTED # List of kernel pieces that need user namespace work # Features - depends on CGROUPS = n depends on MIGRATION = n depends on NUMA = n depends on SYSVIPC = n diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index ed64ccac67c9..c8329b0c2576 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -2160,9 +2160,9 @@ static int attach_task_by_pid(struct cgroup *cgrp, u64 pid, bool threadgroup) * only need to check permissions on one of them. */ tcred = __task_cred(tsk); - if (cred->euid && - cred->euid != tcred->uid && - cred->euid != tcred->suid) { + if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && + !uid_eq(cred->euid, tcred->uid) && + !uid_eq(cred->euid, tcred->suid)) { rcu_read_unlock(); ret = -EACCES; goto out_unlock_cgroup;