]> sourceware.org Git - systemtap.git/commit
Loop on utrace_barrier if utrace_control UTRACE_DETACH returns -EINPROGRESS.
authorMark Wielaard <mjw@redhat.com>
Wed, 9 Jun 2010 09:50:48 +0000 (11:50 +0200)
committerMark Wielaard <mjw@redhat.com>
Wed, 9 Jun 2010 09:59:50 +0000 (11:59 +0200)
commit9cb8092cf84d18e7435f03eef3963e01ea4e993f
tree2de83b7852f7641c138bcf7cc181ac952a37838f
parent6342d92ba53341b61524c001785cd116259e04dc
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.
runtime/itrace.c
runtime/task_finder.c
This page took 0.025412 seconds and 5 git commands to generate.