On 08/19, Roland McGrath wrote:
>
> > Wait. It doesn't break this. It only breaks -EALREADY contract. And
> > I don't understand why this is bad.
>
> The -EALREADY contract lets you have a report_death callback that does all
> your cleanup and then returns UTRACE_DETACH.
I think this is possible w
> Wait. It doesn't break this. It only breaks -EALREADY contract. And
> I don't understand why this is bad.
The -EALREADY contract lets you have a report_death callback that does all
your cleanup and then returns UTRACE_DETACH. To have that plan, you need a
way for an asynchronous detach attempt
On 08/17, Oleg Nesterov wrote:
>
> On 08/16, Roland McGrath wrote:
> >
> > > The problem is, utrace_control(DETACH) does nothing and returns
> > > -EALREADY if utrace->death is set, this is not right. We can and
> > > should detach in this case, we only should skip utrace_reset() to
> > > avoid the
On 08/16, Roland McGrath wrote:
>
> > The problem is, utrace_control(DETACH) does nothing and returns
> > -EALREADY if utrace->death is set, this is not right. We can and
> > should detach in this case, we only should skip utrace_reset() to
> > avoid the race with utrace_report_death()->REPORT_CALL
> The problem is, utrace_control(DETACH) does nothing and returns
> -EALREADY if utrace->death is set, this is not right. We can and
> should detach in this case, we only should skip utrace_reset() to
> avoid the race with utrace_report_death()->REPORT_CALLBACKS().
This behavior is the original (m
Suppose that we want to detach the engine and free engine->data. To
avoid the races with our calbacks which can use ->data we should do
either
err = utrace_set_events(0);
if (err == ...)
utrace_barrier();
utrace_control(DETACH);
or
err = utrace_con