Skip to content

exit: reparent zombie fix + cleanups/optimizations

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sched_show_task: fix unsafe usage of ->real_parentkernel/sched/core.c+3 -11 reply
2/5exit: reparent: use ->ptrace_entry rather than ->sibling for EXIT_DEAD taskskernel/exit.c+3 -30 replies
3/5exit: reparent: cleanup the changing of ->parentkernel/exit.c+5 -80 replies
4/5exit: reparent: cleanup the usage of reparent_leader()kernel/exit.c+9 -130 replies
5/5exit: ptrace: shift "reap dead" code from exit_ptrace() to forget_original_parent()include/linux/ptrace.h kernel/exit.c kernel/ptrace.c+8 -270 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] exit: reparent zombie fix + cleanups/optimizations

Hello.

Quoted 8 lines · Oleg Nesterov

I tried to optimize the usage of tasklist_lock in exit_notify() paths but found the bug which should be fixed first: the EXIT_DEAD setting in reparent_leader() can break the task_ppid_nr_ns()-like code and ptrace_parent().

I am still thinking about the "right" fix, but whatever we do we need to cleanup these users, probably before the fix.

Yes, we need to cleanup these users but lets fix the bug first. See the changelog in 2/5.

Plus cleanups + initial (micro)optimizations, more to come.

Oleg.

 include/linux/ptrace.h |    2 +-
 kernel/exit.c          |   51 +++++++++++++++++++----------------------------
 kernel/ptrace.c        |   23 ++------------------
 kernel/sched/core.c    |    4 ++-
 4 files changed, 28 insertions(+), 52 deletions(-)