Loop on utrace_barrier if utrace_control UTRACE_DETACH returns -EINPROGRESS.
When utrace_control(tsk, eng, UTRACE_DETACH) returns -EINPROGRESS that
means there are still handlers running. So loop on utrace_barrier(tsk, eng)
in that case, till it no longer returns -ERESTARTSYS. That makes sure that
no engine handler will be called afterwards, so we can safely unload the
stap module. Not doing this might have caused PR11672
(utrace_report_syscall_exit crash), although we don't yet have a simple
reproducer for that issue.
* runtime/itrace.c (remove_usr_itrace_info): Loop on utrace_barrier if
utrace_control returned -EINPROGRESS.
* runtime/task_finder.c (stap_utrace_detach): Likewise.
(stap_utrace_detach_ops): Likewise. And warn if stap_utrace_detach
didn't return successfully.
(__stp_utrace_attach): Loop on -ERESTARTSYS after utrace_barrier.
(__stp_utrace_task_finder_target_quiesce): Likewise.