Patchwork sparc64: Fix wrong syscall return value passed to trace_sys_exit()

login
register
mail settings
Submitter Kirill Tkhai
Date July 25, 2013, 9 p.m.
Message ID <164021374786053@web9g.yandex.ru>
Download mbox | patch
Permalink /patch/261966/
State Accepted
Delegated to: David Miller
Headers show

Comments

Kirill Tkhai - July 25, 2013, 9 p.m.
Syscall number is passed instead of return value. Fix that.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: David Miller <davem@davemloft.net>
---
 arch/sparc/kernel/ptrace_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Aug. 1, 2013, 2:11 a.m.
From: Kirill Tkhai <tkhai@yandex.ru>
Date: Fri, 26 Jul 2013 01:00:53 +0400

> Syscall number is passed instead of return value. Fix that.
> 
> Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 7ff45e4..a348330 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -1087,7 +1087,7 @@  asmlinkage void syscall_trace_leave(struct pt_regs *regs)
 	audit_syscall_exit(regs);
 
 	if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
-		trace_sys_exit(regs, regs->u_regs[UREG_G1]);
+		trace_sys_exit(regs, regs->u_regs[UREG_I0]);
 
 	if (test_thread_flag(TIF_SYSCALL_TRACE))
 		tracehook_report_syscall_exit(regs, 0);