Re: [PATCH 3/4] utrace_set_events: fix UTRACE_EVENT(REAP) case

2010-08-26 Thread Oleg Nesterov
On 08/19, Roland McGrath wrote: On 08/16, Roland McGrath wrote: Now that you merged c93fecc925ea7567168f0c94414b9021de2708c5 get_utrace_lock() must not succeed if utrace-reap == T, this becomes a bit off-topic. However, I thought about relaxing the dead check in get_utrace_lock(),

Re: [PATCH 2/3] fix utrace_control(DETACH) utrace-death interaction

2010-08-26 Thread Oleg Nesterov
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 without

Re: [PATCH 0/3] UTRACE_DETACH fixes

2010-08-26 Thread Oleg Nesterov
On 08/19, Roland McGrath wrote: OK, instead of filling utrace_detached_ops{} we can change start_callback() - if (want UTRACE_EVENT(QUIESCE)) { + if ((want UTRACE_EVENT(QUIESCE)) || ops == detached_ops) { If we're going to have a special-case check for utrace_detached_ops,

Re: [PATCH] fix mark_engine_detached() vs start_callback() race

2010-08-26 Thread Oleg Nesterov
On 08/19, Roland McGrath wrote: I think in the longer term mark_engine_detached() should not change engine-flags at all but add QUIESCE to -utrace_flags. However, this breaks utrace_maybe_reap(reap = true) and we should avoid the race with finish_callback() which clears -reporting after