Commit 9c806aa0 authored by Eric W. Biederman's avatar Eric W. Biederman

userns: Convert sched_set_affinity and sched_set_scheduler's permission checks

- Compare kuids with uid_eq
- kuid are uniuqe across all user namespaces so there is no longer the
  need for a user_namespace comparison.
Acked-by: default avatarSerge Hallyn <>
Signed-off-by: default avatarEric W. Biederman <>
parent 76b6db01
......@@ -4042,11 +4042,8 @@ static bool check_same_owner(struct task_struct *p)
pcred = __task_cred(p);
if (cred->user_ns == pcred->user_ns)
match = (cred->euid == pcred->euid ||
cred->euid == pcred->uid);
match = false;
match = (uid_eq(cred->euid, pcred->euid) ||
uid_eq(cred->euid, pcred->uid));
return match;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment