aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/ptrace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index afb819f4ca68..714c3480c52d 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -3266,12 +3266,17 @@ long do_syscall_trace_enter(struct pt_regs *regs)
3266 user_exit(); 3266 user_exit();
3267 3267
3268 if (test_thread_flag(TIF_SYSCALL_EMU)) { 3268 if (test_thread_flag(TIF_SYSCALL_EMU)) {
3269 ptrace_report_syscall(regs);
3270 /* 3269 /*
3270 * A nonzero return code from tracehook_report_syscall_entry()
3271 * tells us to prevent the syscall execution, but we are not
3272 * going to execute it anyway.
3273 *
3271 * Returning -1 will skip the syscall execution. We want to 3274 * Returning -1 will skip the syscall execution. We want to
3272 * avoid clobbering any register also, thus, not 'gotoing' 3275 * avoid clobbering any register also, thus, not 'gotoing'
3273 * skip label. 3276 * skip label.
3274 */ 3277 */
3278 if (tracehook_report_syscall_entry(regs))
3279 ;
3275 return -1; 3280 return -1;
3276 } 3281 }
3277 3282