From: Tony Breeds <tony(a)bakeyournoodle.com>
TIF_SYSCALL_EMU is x86 only, add ifdef into ptrace_report_syscall().
Signed-off-by: Oleg Nesterov <oleg(a)redhat.com>
---
include/linux/tracehook.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 90ca578..a1bac95 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -59,8 +59,12 @@ static inline void ptrace_report_syscall(struct pt_regs *regs)
{
int ptrace = current->ptrace;
- if (!(ptrace & PT_SYSCALL_TRACE) && !test_thread_flag(TIF_SYSCALL_EMU))
- return;
+ if (!(ptrace & PT_SYSCALL_TRACE)) {
+#ifdef TIF_SYSCALL_EMU
+ if (!test_thread_flag(TIF_SYSCALL_EMU))
+#endif
+ return;
+ }
ptrace_notify(SIGTRAP | ((ptrace & PT_TRACESYSGOOD) ? 0x80 : 0));
--
1.5.5.1