aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index ee8d49b9c309..24e0a5a94824 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -198,7 +198,7 @@ int __ptrace_may_access(struct task_struct *task, unsigned int mode)
198 return 0; 198 return 0;
199 rcu_read_lock(); 199 rcu_read_lock();
200 tcred = __task_cred(task); 200 tcred = __task_cred(task);
201 if (cred->user->user_ns == tcred->user->user_ns && 201 if (cred->user_ns == tcred->user_ns &&
202 (cred->uid == tcred->euid && 202 (cred->uid == tcred->euid &&
203 cred->uid == tcred->suid && 203 cred->uid == tcred->suid &&
204 cred->uid == tcred->uid && 204 cred->uid == tcred->uid &&
@@ -206,7 +206,7 @@ int __ptrace_may_access(struct task_struct *task, unsigned int mode)
206 cred->gid == tcred->sgid && 206 cred->gid == tcred->sgid &&
207 cred->gid == tcred->gid)) 207 cred->gid == tcred->gid))
208 goto ok; 208 goto ok;
209 if (ptrace_has_cap(tcred->user->user_ns, mode)) 209 if (ptrace_has_cap(tcred->user_ns, mode))
210 goto ok; 210 goto ok;
211 rcu_read_unlock(); 211 rcu_read_unlock();
212 return -EPERM; 212 return -EPERM;