rdtgroup_task_write_permission() makes the comparisons of the cgroup v1 code, euid 0 included. Use the library. No functional change. Signed-off-by: Josef Bacik --- fs/resctrl/rdtgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 57ab090072c2..6b7b7daa9fd3 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -732,9 +732,7 @@ static int rdtgroup_task_write_permission(struct task_struct *task, * Even if we're attaching all tasks in the thread group, we only * need to check permissions on one of them. */ - if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && - !uid_eq(cred->euid, tcred->uid) && - !uid_eq(cred->euid, tcred->suid)) { + if (!cred_ids_allow_move(cred, tcred)) { rdt_last_cmd_printf("No permission to move task %d\n", task->pid); ret = -EPERM; } -- 2.55.0