aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 1baf13ed5c3a..003f8eed32f4 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)
289 289
290 if (request == PTRACE_TRACEME) { 290 if (request == PTRACE_TRACEME) {
291 ret = ptrace_traceme(); 291 ret = ptrace_traceme();
292 pt_succ_return(regs, 0); 292 if (ret < 0)
293 pt_error_return(regs, -ret);
294 else
295 pt_succ_return(regs, 0);
293 goto out; 296 goto out;
294 } 297 }
295 298
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c
index d31975e6d6f6..81111a12f0a8 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)
202#endif 202#endif
203 if (request == PTRACE_TRACEME) { 203 if (request == PTRACE_TRACEME) {
204 ret = ptrace_traceme(); 204 ret = ptrace_traceme();
205 pt_succ_return(regs, 0); 205 if (ret < 0)
206 pt_error_return(regs, -ret);
207 else
208 pt_succ_return(regs, 0);
206 goto out; 209 goto out;
207 } 210 }
208 211