pidns: Closing the pid namespace exit race.
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | pidns: Use task_active_pid_ns in do_notify_parent.kernel/ | +5 | 0 replies | |
| 2/3 | pidns: Guarantee that the pidns init will be the last pidns process reaped.kernel/ | +35 | 23 replies | |
| 3/3 | pidns: Make killed children autoreapkernel/ | +6 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Eric W. Biederman |
|---|---|
| 1/3 | |
| 2/3 | A-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] pidns: Closing the pid namespace exit race.
I had some patches that broke the circular reference between the pid_namespace and the proc_mnt by combining the reference counts but the world has changes and now the proc_mnt reference count is not suitable to be used that way so that plan is scrapped.
I did play with it and I have found a relatively elegant way of at least handling the problem of self reaping children escaping from zap_pid_ns_processess.
The following patches guarantee that the task with pid == 1 will be the last task reaped in a pid namespace. Making proc_flush_task safe.
The previous patch to call pid_ns_release_proc on fork failure is still needed. These patches simply address the other failure mode.
How did it escape my memory that setting SIGCHLD to SIG_IGN caused children to autoreap?
Eric W. Biederman (3):
pidns: Use task_active_pid_ns in do_notify_parent.
pidns: Guarantee that the pidns init will be the last pidns process reaped.
pidns: Make killed children autoreap
kernel/exit.c | 46 +++++++++++++++++++++++++++++++++++----------- kernel/pid_namespace.c | 7 ++++++- kernel/signal.c | 11 +++++------ 3 files changed, 46 insertions(+), 18 deletions(-)