OSDN Git Service

ptrace: move clearing of TIF_SYSCALL_EMU flag to core
authorSudeep Holla <sudeep.holla@arm.com>
Thu, 23 May 2019 09:06:15 +0000 (10:06 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 5 Jun 2019 16:51:17 +0000 (17:51 +0100)
commit15532fd6f57c297c45ef3f5c17d2fbcdcc8092e4
tree62a174343e0da5c5e08082811366b23864cee0df
parent616810360043183a9db73e39f5aadbe48952c383
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 <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/powerpc/kernel/ptrace.c
arch/x86/kernel/ptrace.c
kernel/ptrace.c