utrace_do_stop() sets utrace->stopped but leaves the tracee in TASK_STOPPED state. This means SIGCONT can wake up the tracee and fool the tracer.
Signed-off-by: Oleg Nesterov <o...@redhat.com> --- kernel/utrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- __UTRACE/kernel/utrace.c~JCTL_4_STOP_TRACED 2009-07-28 23:59:28.000000000 +0200 +++ __UTRACE/kernel/utrace.c 2009-07-29 00:14:42.000000000 +0200 @@ -788,8 +788,9 @@ static bool utrace_do_stop(struct task_s } else if (task_is_stopped(target)) { /* * Stopped is considered quiescent; when it wakes up, it will - * go through utrace_get_signal() before doing anything else. + * go through utrace_finish_jctl() before doing anything else. */ + __set_task_state(target, TASK_TRACED); utrace->stopped = stopped = true; } else if (!utrace->report && !utrace->interrupt) { utrace->report = 1;