From: Alexey Dobriyan Date: Sat, 2 Dec 2006 04:18:40 +0000 (-0800) Subject: [SPARC{32,64}]: Propagate ptrace_traceme() return value. X-Git-Tag: v2.6.20-rc1~145^2~4^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35bca36cf7b20a73a89f87aab34b1b4dfff6bf08;p=linux-2.6 [SPARC{32,64}]: Propagate ptrace_traceme() return value. ptrace_traceme() consolidation made ret = ptrace_traceme(); dead write. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller --- diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 1baf13ed5c..003f8eed32 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 d31975e6d6..81111a12f0 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; }