aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 5f8d452e8111..dcc199c43a12 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -168,8 +168,6 @@ int ptrace_attach(struct task_struct *task)
168 audit_ptrace(task); 168 audit_ptrace(task);
169 169
170 retval = -EPERM; 170 retval = -EPERM;
171 if (task->pid <= 1)
172 goto out;
173 if (same_thread_group(task, current)) 171 if (same_thread_group(task, current))
174 goto out; 172 goto out;
175 173
@@ -521,12 +519,6 @@ struct task_struct *ptrace_get_task_struct(pid_t pid)
521{ 519{
522 struct task_struct *child; 520 struct task_struct *child;
523 521
524 /*
525 * Tracing init is not allowed.
526 */
527 if (pid == 1)
528 return ERR_PTR(-EPERM);
529
530 read_lock(&tasklist_lock); 522 read_lock(&tasklist_lock);
531 child = find_task_by_vpid(pid); 523 child = find_task_by_vpid(pid);
532 if (child) 524 if (child)