Skip to content

exit/pid_ns: comments + simple fix

Oleg Nesterov lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 14 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2exit: pidns: alloc_pid() leaks pid_namespace if child_reaper is exitingkernel/pid.c+2 -01 reply
2/2exit: pidns: fix/update the comments in zap_pid_ns_processes()kernel/pid_namespace.c+24 -42 replies

Reviews trailers per patch

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

PatchEric W. Biederman
1/2R-b
2/2

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

Read the v2 thread

Cover letter [PATCH v2 0/2] exit/pid_ns: comments + simple fix

To remind, this doesn't depend on other changes in -mm.

It is not clear to me if I addressed Eric's objections or not, but let me send V2 (I reordered these patches).

I updated the changelog/comments in 2/2, hopefully now it is more clear that this patch only tries to explain how the current code works, and why do we need to wait for nr_hashed==init_pids from the kernel perspective. Otherwise it is basically the same patch, except I added another note about sys_wait4().

And, Eric, let me repeat. In any case we do not need for EXIT_DEAD tasks. They are stealth. In fact this state should die, it only complicates do_wait/reparenting/etc but we can't avoid it right now (mostly because of the locking in wait paths).

IOW. If we could somehow detect that this pid_ns has only EXIT_DEAD tasks we could return and user-space won't notice this change. No, it is not that I think we should do this, but this should be documented.

Please review.

Oleg.