No functional changes. Add the new helper, ptrace_set_syscall_trace(), which should be used to set/clear TIF_SYSCALL_TRACE in ptrace code. Currently it does nothing more. Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx> --- kernel/ptrace.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/kernel/ptrace.c b/kernel/ptrace.c index a464ab5..43357e5 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -38,6 +38,14 @@ void ptrace_signal_wake_up(struct task_struct *p, int quiescent) kick_process(p); } +static void ptrace_set_syscall_trace(struct task_struct *p, bool on) +{ + if (on) + set_tsk_thread_flag(p, TIF_SYSCALL_TRACE); + else + clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); +} + static int ptrace_trapping_sleep_fn(void *flags) { schedule(); @@ -418,7 +426,7 @@ static int ptrace_detach(struct task_struct *child, unsigned int data) /* Architecture-specific hardware disable .. */ ptrace_disable(child); - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + ptrace_set_syscall_trace(child, false); write_lock_irq(&tasklist_lock); /* @@ -606,10 +614,7 @@ static int ptrace_resume(struct task_struct *child, long request, if (!valid_signal(data)) return -EIO; - if (request == PTRACE_SYSCALL) - set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); - else - clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); + ptrace_set_syscall_trace(child, request == PTRACE_SYSCALL); #ifdef TIF_SYSCALL_EMU if (request == PTRACE_SYSEMU || request == PTRACE_SYSEMU_SINGLESTEP) -- 1.5.5.1 _______________________________________________ kernel mailing list kernel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/kernel