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
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
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.
+
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
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