[SPARC{32,64}]: Propagate ptrace_traceme() return value.
authorAlexey Dobriyan <adobriyan@openvz.org>
Sat, 2 Dec 2006 04:18:40 +0000 (20:18 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 10 Dec 2006 10:40:27 +0000 (02:40 -0800)
ptrace_traceme() consolidation made

ret = ptrace_traceme();

dead write.

Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/ptrace.c
arch/sparc64/kernel/ptrace.c

index 1baf13ed5c3a6b6e7186c022e69108ec6d490c46..003f8eed32f413e8ba835bdcfea2e16d703789c5 100644 (file)
@@ -289,7 +289,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
 
        if (request == PTRACE_TRACEME) {
                ret = ptrace_traceme();
-               pt_succ_return(regs, 0);
+               if (ret < 0)
+                       pt_error_return(regs, -ret);
+               else
+                       pt_succ_return(regs, 0);
                goto out;
        }
 
index d31975e6d6f6bd80aa4b8adee52c5d6a36181239..81111a12f0a83bffe186c418048734f9a3493683 100644 (file)
@@ -202,7 +202,10 @@ asmlinkage void do_ptrace(struct pt_regs *regs)
 #endif
        if (request == PTRACE_TRACEME) {
                ret = ptrace_traceme();
-               pt_succ_return(regs, 0);
+               if (ret < 0)
+                       pt_error_return(regs, -ret);
+               else
+                       pt_succ_return(regs, 0);
                goto out;
        }