On Thu, Jun 24, 2021 at 12:03 PM Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote: > > Implement start_task_exit_locked and rewrite the de_thread logic > in exec using it. > > Calling start_task_exit_locked is equivalent to asyncrhonously > calling exit(2) aka pthread_exit on a task. Ok, so this is the patch that makes me go "Yeah, this seems to all go together". The whole "start_exit()" thing seemed fairly sane as an interesting concept to the whole ptrace notification thing, but this one actually made me think it makes conceptual sense and how we had exactly that "start exit asynchronously" case already in zap_other_threads(). So doing that zap_other_threads() as that async exit makes me just thin kthat yes, this series is the right thing, because it not only cleans up the ptrace condition, it makes sense in this entirely unrelated area too. So I think I'm convinced. I'd like Oleg in particular to Ack this series, and Al to look it over, but I do think this is the right direction. Linus