diff options
| author | Sudeep Holla <[email protected]> | 2019-05-23 10:06:15 +0100 |
|---|---|---|
| committer | Catalin Marinas <[email protected]> | 2019-06-05 17:51:17 +0100 |
| commit | 15532fd6f57c297c45ef3f5c17d2fbcdcc8092e4 (patch) | |
| tree | 62a174343e0da5c5e08082811366b23864cee0df /kernel | |
| parent | 616810360043183a9db73e39f5aadbe48952c383 (diff) | |
ptrace: move clearing of TIF_SYSCALL_EMU flag to core
While the TIF_SYSCALL_EMU is set in ptrace_resume independent of any
architecture, currently only powerpc and x86 unset the TIF_SYSCALL_EMU
flag in ptrace_disable which gets called from ptrace_detach.
Let's move the clearing of TIF_SYSCALL_EMU flag to __ptrace_unlink
which gets executed from ptrace_detach and also keep it along with
or close to clearing of TIF_SYSCALL_TRACE.
Cc: Paul Mackerras <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/ptrace.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 5710d07e67cf..ab14654b2436 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -118,6 +118,9 @@ void __ptrace_unlink(struct task_struct *child) BUG_ON(!child->ptrace); clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); +#ifdef TIF_SYSCALL_EMU + clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); +#endif child->parent = child->real_parent; list_del_init(&child->ptrace_entry); |