summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@openvz.org>2006-12-02 04:18:40 (GMT)
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-10 10:40:27 (GMT)
commit35bca36cf7b20a73a89f87aab34b1b4dfff6bf08 (patch)
tree0b1b59d0bfcf42e38a8b4b4eafac208f3b7ed4cb
parent982c2064d9a8b51404088d132489a25e2db807fd (diff)
downloadlinux-fsl-qoriq-35bca36cf7b20a73a89f87aab34b1b4dfff6bf08.tar.xz
[SPARC{32,64}]: Propagate ptrace_traceme() return value.
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>
-rw-r--r--arch/sparc/kernel/ptrace.c5
-rw-r--r--arch/sparc64/kernel/ptrace.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c
index 1baf13e..003f8ee 100644
--- a/arch/sparc/kernel/ptrace.c
+++ b/arch/sparc/kernel/ptrace.c
@@ -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;
}
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index d31975e..81111a1 100644
--- a/arch/sparc64/kernel/ptrace.c
+++ b/arch/sparc64/kernel/ptrace.c
@@ -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;
}