aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r--kernel/ptrace.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 9fb51237b18c..6af9cdd558b7 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -14,7 +14,6 @@
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/highmem.h> 15#include <linux/highmem.h>
16#include <linux/pagemap.h> 16#include <linux/pagemap.h>
17#include <linux/smp_lock.h>
18#include <linux/ptrace.h> 17#include <linux/ptrace.h>
19#include <linux/security.h> 18#include <linux/security.h>
20#include <linux/signal.h> 19#include <linux/signal.h>
@@ -665,10 +664,6 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
665 struct task_struct *child; 664 struct task_struct *child;
666 long ret; 665 long ret;
667 666
668 /*
669 * This lock_kernel fixes a subtle race with suid exec
670 */
671 lock_kernel();
672 if (request == PTRACE_TRACEME) { 667 if (request == PTRACE_TRACEME) {
673 ret = ptrace_traceme(); 668 ret = ptrace_traceme();
674 if (!ret) 669 if (!ret)
@@ -702,7 +697,6 @@ SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data)
702 out_put_task_struct: 697 out_put_task_struct:
703 put_task_struct(child); 698 put_task_struct(child);
704 out: 699 out:
705 unlock_kernel();
706 return ret; 700 return ret;
707} 701}
708 702
@@ -812,10 +806,6 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
812 struct task_struct *child; 806 struct task_struct *child;
813 long ret; 807 long ret;
814 808
815 /*
816 * This lock_kernel fixes a subtle race with suid exec
817 */
818 lock_kernel();
819 if (request == PTRACE_TRACEME) { 809 if (request == PTRACE_TRACEME) {
820 ret = ptrace_traceme(); 810 ret = ptrace_traceme();
821 goto out; 811 goto out;
@@ -845,7 +835,6 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
845 out_put_task_struct: 835 out_put_task_struct:
846 put_task_struct(child); 836 put_task_struct(child);
847 out: 837 out:
848 unlock_kernel();
849 return ret; 838 return ret;
850} 839}
851#endif /* CONFIG_COMPAT */ 840#endif /* CONFIG_COMPAT */