aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/ptrace.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 14e38261cd31..592a39d0ef31 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -911,14 +911,8 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
911{ 911{
912 unsigned long ip; 912 unsigned long ip;
913 913
914 if (why)
915 audit_syscall_exit(regs);
916 else
917 audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
918 regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
919
920 if (!test_thread_flag(TIF_SYSCALL_TRACE)) 914 if (!test_thread_flag(TIF_SYSCALL_TRACE))
921 return scno; 915 goto out_no_trace;
922 916
923 current_thread_info()->syscall = scno; 917 current_thread_info()->syscall = scno;
924 918
@@ -935,6 +929,13 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
935 current_thread_info()->syscall = -1; 929 current_thread_info()->syscall = -1;
936 930
937 regs->ARM_ip = ip; 931 regs->ARM_ip = ip;
932 scno = current_thread_info()->syscall;
938 933
939 return current_thread_info()->syscall; 934out_no_trace:
935 if (why)
936 audit_syscall_exit(regs);
937 else
938 audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
939 regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
940 return scno;
940} 941}