From bba7fc0a21d76ef951cdac6d11896dc6b5a9ffa7 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 17 Jun 2009 16:27:25 -0700 Subject: 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: Oleg Nesterov Cc: David Howells Acked-by: Kyle McMartin Cc: Grant Grundler Cc: Matthew Wilcox Acked-by: Martin Schwidefsky Cc: Heiko Carstens Acked-by: Paul Mundt Acked-by: Chris Zankel Acked-by: Roland McGrath Acked-by: Haavard Skinnemoen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/avr32/kernel/process.c | 2 -- arch/mn10300/kernel/process.c | 3 --- arch/parisc/hpux/fs.c | 5 ----- arch/parisc/kernel/process.c | 5 ----- arch/parisc/kernel/sys_parisc32.c | 5 ----- arch/s390/kernel/compat_linux.c | 3 --- arch/s390/kernel/process.c | 3 --- arch/sh/kernel/process_32.c | 5 ----- arch/sh/kernel/process_64.c | 5 ----- arch/xtensa/kernel/process.c | 5 ----- 10 files changed, 41 deletions(-) (limited to 'arch') diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c index 1bbe1da5486..93c0342530a 100644 --- a/arch/avr32/kernel/process.c +++ b/arch/avr32/kernel/process.c @@ -394,8 +394,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user *__user *uargv, goto out; error = do_execve(filename, uargv, uenvp, regs); - if (error == 0) - current->ptrace &= ~PT_DTRACE; putname(filename); out: diff --git a/arch/mn10300/kernel/process.c b/arch/mn10300/kernel/process.c index 234cf344cdc..892cce82867 100644 --- a/arch/mn10300/kernel/process.c +++ b/arch/mn10300/kernel/process.c @@ -281,9 +281,6 @@ asmlinkage long sys_execve(char __user *name, error = PTR_ERR(filename); if (!IS_ERR(filename)) { error = do_execve(filename, argv, envp, __frame); - if (error == 0) - current->ptrace &= ~PT_DTRACE; - putname(filename); } diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c index 5cbe9f9e5d9..54075360a8f 100644 --- a/arch/parisc/hpux/fs.c +++ b/arch/parisc/hpux/fs.c @@ -44,11 +44,6 @@ int hpux_execve(struct pt_regs *regs) error = do_execve(filename, (char __user * __user *) regs->gr[25], (char __user * __user *) regs->gr[24], regs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); - } putname(filename); out: diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 6f69101f90b..61c07078c07 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -349,11 +349,6 @@ asmlinkage int sys_execve(struct pt_regs *regs) goto out; error = do_execve(filename, (char __user * __user *) regs->gr[25], (char __user * __user *) regs->gr[24], regs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); - } putname(filename); out: diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 0838155b7a8..1adb40c8166 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c @@ -77,11 +77,6 @@ asmlinkage int sys32_execve(struct pt_regs *regs) goto out; error = compat_do_execve(filename, compat_ptr(regs->gr[25]), compat_ptr(regs->gr[24]), regs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); - } putname(filename); out: diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 002c70d3cb7..9ab188d67a3 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c @@ -461,9 +461,6 @@ asmlinkage long sys32_execve(void) result = rc; goto out_putname; } - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); current->thread.fp_regs.fpc=0; asm volatile("sfpc %0,0" : : "d" (0)); result = regs->gprs[2]; diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 355f7a30c3f..5a43f27eec1 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -266,9 +266,6 @@ SYSCALL_DEFINE0(vfork) asmlinkage void execve_tail(void) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); current->thread.fp_regs.fpc = 0; if (MACHINE_HAS_IEEE) asm volatile("sfpc %0,%0" : : "d" (0)); diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 9289ede29c7..601bbc0ec74 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c @@ -367,11 +367,6 @@ asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, goto out; error = do_execve(filename, uargv, uenvp, regs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); - } putname(filename); out: return error; diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index 96be839040f..3826773496d 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c @@ -529,11 +529,6 @@ asmlinkage int sys_execve(char *ufilename, char **uargv, (char __user * __user *)uargv, (char __user * __user *)uenvp, pregs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); - } putname(filename); out: return error; diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c index 031f3668571..e1a04a346e7 100644 --- a/arch/xtensa/kernel/process.c +++ b/arch/xtensa/kernel/process.c @@ -331,11 +331,6 @@ long xtensa_execve(char __user *name, char __user * __user *argv, if (IS_ERR(filename)) goto out; error = do_execve(filename, argv, envp, regs); - if (error == 0) { - task_lock(current); - current->ptrace &= ~PT_DTRACE; - task_unlock(current); - } putname(filename); out: return error; -- cgit v1.2.3-18-g5258