Ales Novak 0a5bf409d3 ptrace: clear TIF_SYSCALL_TRACE on ptrace detach
On __ptrace_detach(), called from do_exit()->exit_notify()->
forget_original_parent()->exit_ptrace(), the TIF_SYSCALL_TRACE in
thread->flags of the tracee is not cleared up.  This results in the
tracehook_report_syscall_* being called (though there's no longer a tracer
listening to that) upon its further syscalls.

Example scenario - attach "strace" to a running process and kill it (the
strace) with SIGKILL.  You'll see that the syscall trace hooks are still
being called.

The clearing of this flag should be moved from ptrace_detach() to
__ptrace_detach().

Link: http://lkml.kernel.org/r/1472759493-20554-1-git-send-email-alnovak@suse.cz
Signed-off-by: Ales Novak <alnovak@suse.cz>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-11 15:06:32 -07:00
..
2016-10-06 10:49:01 -07:00
2016-10-10 09:29:50 -07:00
2015-04-11 22:27:55 -04:00
2015-11-19 17:51:48 +01:00
2016-01-22 18:04:28 -05:00
2016-04-04 09:46:47 -04:00
2016-09-16 11:31:17 -04:00
2015-04-12 21:03:31 +02:00
2016-08-24 12:16:13 +02:00
2015-11-23 09:44:58 +01:00
2016-08-05 09:00:54 -04:00
2016-02-16 13:04:58 -05:00
2016-05-27 15:26:11 -07:00
2016-03-01 20:36:56 +01:00
2016-10-07 18:46:30 -07:00
2016-09-22 20:00:36 -05:00
2016-08-29 08:13:21 -06:00