ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensa
authorOleg Nesterov <oleg@redhat.com>
Wed, 17 Jun 2009 23:27:25 +0000 (16:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:48 +0000 (13:03 -0700)
avr32, mn10300, parisc, s390, sh, xtensa:

They never set PT_DTRACE, but clear it after do_execve().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Chris Zankel <chris@zankel.net>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/avr32/kernel/process.c
arch/mn10300/kernel/process.c
arch/parisc/hpux/fs.c
arch/parisc/kernel/process.c
arch/parisc/kernel/sys_parisc32.c
arch/s390/kernel/compat_linux.c
arch/s390/kernel/process.c
arch/sh/kernel/process_32.c
arch/sh/kernel/process_64.c
arch/xtensa/kernel/process.c

index 1bbe1da..93c0342 100644 (file)
@@ -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:
index 234cf34..892cce8 100644 (file)
@@ -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);
        }
 
index 5cbe9f9..5407536 100644 (file)
@@ -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:
index 6f69101..61c0707 100644 (file)
@@ -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:
 
index 0838155..1adb40c 100644 (file)
@@ -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:
 
index 002c70d..9ab188d 100644 (file)
@@ -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];
index 355f7a3..5a43f27 100644 (file)
@@ -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));
index 9289ede..601bbc0 100644 (file)
@@ -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;
index 96be839..3826773 100644 (file)
@@ -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;
index 031f366..e1a04a3 100644 (file)
@@ -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;