Re: Q: utrace_prepare_examine() get_task_struct(target)

2009-07-24 Thread Roland McGrath
I still think EXIT_DEAD check must die ;) In get_utrace_lock, you mean? Do you mean it's superfluous because we can rely on utrace_reap having cleared engine-ops before it matters to us? Yes. Perhaps I missed something, but this check buys nothing. First of all this check is racy

Re: Q: utrace_prepare_examine() get_task_struct(target)

2009-07-23 Thread Oleg Nesterov
On 07/22, Roland McGrath wrote: I still think EXIT_DEAD check must die ;) In get_utrace_lock, you mean? Do you mean it's superfluous because we can rely on utrace_reap having cleared engine-ops before it matters to us? Yes. Perhaps I missed something, but this check buys nothing. First of

Re: Q: utrace_prepare_examine() get_task_struct(target)

2009-07-22 Thread Roland McGrath
engine-ops = NULL; + engine-flags = 0; list_move(engine-entry, detached); I think this makes sense regardless. Agreed. +* Make sure all engine-flags and engine-ops updates are done +* before the current task_struct might really die. +

Q: utrace_prepare_examine() get_task_struct(target)

2009-07-20 Thread Oleg Nesterov
I fail to understand rcu_read_lock() + get_task_struct() in utrace_prepare_examine(). This looks as if the caller does not need to make sure task_struct can't go away. But, unless the caller does get_task_struct() itself (like ptrace does), utrace_prepare_examine() can race with utrace_reap() (if

Re: Q: utrace_prepare_examine() get_task_struct(target)

2009-07-20 Thread Roland McGrath
The utrace_*_examine calls have been neither used nor examined much at all (no pun intended). So both the API and the implementation for these can use a fresh look and reconsideration. Also, this is somewhat intimately tied up with the broader synchronization picture. So it might make most