Commit bba7fc0a authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa

avr32, mn10300, parisc, s390, sh, xtensa:

They never set PT_DTRACE, but clear it after do_execve().
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: default avatarKyle McMartin <kyle@mcmartin.ca>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Acked-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
Acked-by: default avatarChris Zankel <chris@zankel.net>
Acked-by: default avatarRoland McGrath <roland@redhat.com>
Acked-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 02e78749
...@@ -394,8 +394,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user *__user *uargv, ...@@ -394,8 +394,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user *__user *uargv,
goto out; goto out;
error = do_execve(filename, uargv, uenvp, regs); error = do_execve(filename, uargv, uenvp, regs);
if (error == 0)
current->ptrace &= ~PT_DTRACE;
putname(filename); putname(filename);
out: out:
......
...@@ -281,9 +281,6 @@ asmlinkage long sys_execve(char __user *name, ...@@ -281,9 +281,6 @@ asmlinkage long sys_execve(char __user *name,
error = PTR_ERR(filename); error = PTR_ERR(filename);
if (!IS_ERR(filename)) { if (!IS_ERR(filename)) {
error = do_execve(filename, argv, envp, __frame); error = do_execve(filename, argv, envp, __frame);
if (error == 0)
current->ptrace &= ~PT_DTRACE;
putname(filename); putname(filename);
} }
......
...@@ -44,11 +44,6 @@ int hpux_execve(struct pt_regs *regs) ...@@ -44,11 +44,6 @@ int hpux_execve(struct pt_regs *regs)
error = do_execve(filename, (char __user * __user *) regs->gr[25], error = do_execve(filename, (char __user * __user *) regs->gr[25],
(char __user * __user *) regs->gr[24], regs); (char __user * __user *) regs->gr[24], regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
}
putname(filename); putname(filename);
out: out:
......
...@@ -349,11 +349,6 @@ asmlinkage int sys_execve(struct pt_regs *regs) ...@@ -349,11 +349,6 @@ asmlinkage int sys_execve(struct pt_regs *regs)
goto out; goto out;
error = do_execve(filename, (char __user * __user *) regs->gr[25], error = do_execve(filename, (char __user * __user *) regs->gr[25],
(char __user * __user *) regs->gr[24], regs); (char __user * __user *) regs->gr[24], regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
}
putname(filename); putname(filename);
out: out:
......
...@@ -77,11 +77,6 @@ asmlinkage int sys32_execve(struct pt_regs *regs) ...@@ -77,11 +77,6 @@ asmlinkage int sys32_execve(struct pt_regs *regs)
goto out; goto out;
error = compat_do_execve(filename, compat_ptr(regs->gr[25]), error = compat_do_execve(filename, compat_ptr(regs->gr[25]),
compat_ptr(regs->gr[24]), regs); compat_ptr(regs->gr[24]), regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
}
putname(filename); putname(filename);
out: out:
......
...@@ -461,9 +461,6 @@ asmlinkage long sys32_execve(void) ...@@ -461,9 +461,6 @@ asmlinkage long sys32_execve(void)
result = rc; result = rc;
goto out_putname; goto out_putname;
} }
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
current->thread.fp_regs.fpc=0; current->thread.fp_regs.fpc=0;
asm volatile("sfpc %0,0" : : "d" (0)); asm volatile("sfpc %0,0" : : "d" (0));
result = regs->gprs[2]; result = regs->gprs[2];
......
...@@ -266,9 +266,6 @@ SYSCALL_DEFINE0(vfork) ...@@ -266,9 +266,6 @@ SYSCALL_DEFINE0(vfork)
asmlinkage void execve_tail(void) asmlinkage void execve_tail(void)
{ {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
current->thread.fp_regs.fpc = 0; current->thread.fp_regs.fpc = 0;
if (MACHINE_HAS_IEEE) if (MACHINE_HAS_IEEE)
asm volatile("sfpc %0,%0" : : "d" (0)); asm volatile("sfpc %0,%0" : : "d" (0));
......
...@@ -367,11 +367,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, ...@@ -367,11 +367,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
goto out; goto out;
error = do_execve(filename, uargv, uenvp, regs); error = do_execve(filename, uargv, uenvp, regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
}
putname(filename); putname(filename);
out: out:
return error; return error;
......
...@@ -529,11 +529,6 @@ asmlinkage int sys_execve(char *ufilename, char **uargv, ...@@ -529,11 +529,6 @@ asmlinkage int sys_execve(char *ufilename, char **uargv,
(char __user * __user *)uargv, (char __user * __user *)uargv,
(char __user * __user *)uenvp, (char __user * __user *)uenvp,
pregs); pregs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
}
putname(filename); putname(filename);
out: out:
return error; return error;
......
...@@ -331,11 +331,6 @@ long xtensa_execve(char __user *name, char __user * __user *argv, ...@@ -331,11 +331,6 @@ long xtensa_execve(char __user *name, char __user * __user *argv,
if (IS_ERR(filename)) if (IS_ERR(filename))
goto out; goto out;
error = do_execve(filename, argv, envp, regs); error = do_execve(filename, argv, envp, regs);
if (error == 0) {
task_lock(current);
current->ptrace &= ~PT_DTRACE;
task_unlock(current);
}
putname(filename); putname(filename);
out: out:
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment