set_one_prio_perm() makes the two comparisons of check_same_owner(), written the other way around. Use the library. No functional change. Signed-off-by: Josef Bacik --- kernel/sys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index 755bfa5ccd92..e43491a9dceb 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -220,8 +220,7 @@ static bool set_one_prio_perm(struct task_struct *p) { const struct cred *cred = current_cred(), *pcred = __task_cred(p); - if (uid_eq(pcred->uid, cred->euid) || - uid_eq(pcred->euid, cred->euid)) + if (cred_ids_allow_sched(cred, pcred)) return true; if (ns_capable(pcred->user_ns, CAP_SYS_NICE)) return true; -- 2.55.0