> Whatever we do, start_callback() can see the old engine->flags but > the new ->ops = &utrace_detached_ops. Just suppose that the caller > of UTRACE_DETACH is interrupted right after setting engine->ops.
* it can check the old flags before using the old ops, or check the old * flags before using the new ops, or check the new flags before using the * new ops, but can never check the new flags before using the old ops. > Or do you think I miss something and this is false alarm? * Hence, utrace_detached_ops might be used with any old flags in place. * It has report_quiesce() and report_reap() callbacks to handle all cases. report_reap is covered with the utrace_detached_reap() stub. Every other callback uses start_callback(), i.e. calls report_quiesce first. utrace_detached_quiesce() returns UTRACE_DETACH, so start_callback() will return NULL. > [...] but I can no longer think properly today. Sleep well. :-) Thanks, Roland