> Not sure. Suppose we call utrace_control(old, UTRACE_DETACH) right
> before the tracee utrace_get_signal() calls ops->report_signal().

Then utrace_control() returns -EINPROGRESS.  If it returned 0, then
ops->report_signal will not be called.  If that's not so, utrace_control
is broken.

> utrace_control()->get_utrace_lock() succeeds, but when utrace_control()
> checks ->reporting it could be already cleared.

If it's already cleared then that means that ops->report_signal has
returned and its return value has been processed.  If that's not so,
utrace_control is broken.

> > If it fails, then the old engine's callback has
> > run or is starting to run,
> 
> Yes, and we can't know (afaics) whether UTRACE_SIGNAL_DELIVER was
> already returned or not.

I don't follow.  If utrace_control returned zero, then any callback has
returned whatever it was going to return before the detach takes effect.
If that's not so, utrace_control is broken.


Thanks,
Roland

Reply via email to