[PATCH 05/13] sched: use cred_ids_allow_sched()
Josef Bacik
josef at toxicpanda.com
Sun Oct 18 17:31:47 UTC 2026
Use the library in check_same_owner().
No functional change.
Assisted-by: LLM
Signed-off-by: Josef Bacik <josef at toxicpanda.com>
---
kernel/sched/syscalls.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/syscalls.c b/kernel/sched/syscalls.c
index b215b0ead9a6..a361a02e1d02 100644
--- a/kernel/sched/syscalls.c
+++ b/kernel/sched/syscalls.c
@@ -280,8 +280,7 @@ static bool check_same_owner(struct task_struct *p)
guard(rcu)();
pcred = __task_cred(p);
- return (uid_eq(cred->euid, pcred->euid) ||
- uid_eq(cred->euid, pcred->uid));
+ return cred_ids_allow_sched(cred, pcred);
}
#ifdef CONFIG_RT_MUTEXES
--
2.55.0
More information about the Linux-security-module-archive
mailing list