aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sys.c')
-rw-r--r--kernel/sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 7f5a0cd296a9..66136ca33a7b 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1377,7 +1377,8 @@ static int check_prlimit_permission(struct task_struct *task)
1377 const struct cred *cred = current_cred(), *tcred; 1377 const struct cred *cred = current_cred(), *tcred;
1378 1378
1379 tcred = __task_cred(task); 1379 tcred = __task_cred(task);
1380 if ((cred->uid != tcred->euid || 1380 if (current != task &&
1381 (cred->uid != tcred->euid ||
1381 cred->uid != tcred->suid || 1382 cred->uid != tcred->suid ||
1382 cred->uid != tcred->uid || 1383 cred->uid != tcred->uid ||
1383 cred->gid != tcred->egid || 1384 cred->gid != tcred->egid ||