[PATCH] ARM: pass syscall return value to sys_exit tracepoint

Andrew Gabbasov andrew_gabbasov at mentor.com
Sat Dec 1 08:38:54 EST 2012


sys_exit tracepoint expects the syscall return value as a second
argument, rather than syscall number.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov at mentor.com>
---
 arch/arm/kernel/ptrace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 739db3a..4206da7 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -956,7 +956,7 @@ asmlinkage int syscall_trace_exit(struct pt_regs *regs, int scno)
 {
 	scno = ptrace_syscall_trace(regs, scno, PTRACE_SYSCALL_EXIT);
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
-		trace_sys_exit(regs, scno);
+		trace_sys_exit(regs, regs->ARM_r0);
 	audit_syscall_exit(regs);
 	return scno;
 }
-- 
1.7.10.4




More information about the linux-arm-kernel mailing list