c36a311e8a6c1bbe6115dc1810ac88344782857c breaks utrace_control_dead() logic.
It is important that utrace_reset(safe) is called with "safe = true" when we detach from the dead task. Otherwise, this engine will not be "unlinked" until utrace_release_task(), and given that the dead task can stay in zombie state unpredictably long we have problems: for example, utrace_barrier() will hang. Signed-off-by: Oleg Nesterov <o...@redhat.com> --- kernel/utrace.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- __UTRACE/kernel/utrace.c~1_FIX_DEAD_DETACH 2009-09-01 19:12:14.000000000 +0200 +++ __UTRACE/kernel/utrace.c 2009-09-01 20:02:26.000000000 +0200 @@ -1037,7 +1037,7 @@ int utrace_control(struct task_struct *t enum utrace_resume_action action) { struct utrace *utrace; - bool reset; + bool reset, safe = false; int ret; if (unlikely(action > UTRACE_DETACH)) @@ -1074,7 +1074,7 @@ int utrace_control(struct task_struct *t spin_unlock(&utrace->lock); return ret; } - reset = true; + reset = safe = true; } switch (action) { @@ -1212,8 +1212,8 @@ int utrace_control(struct task_struct *t * there is nothing more we need to do. */ if (reset) - utrace_reset(target, utrace, - utrace->stopped || target == current); + utrace_reset(target, utrace, safe || utrace->stopped || + target == current); else spin_unlock(&utrace->lock);