[PATCH 0/3] pidns: Closing the pid namespace exit race.

From: Eric W. Biederman
Date: Sun May 06 2012 - 20:33:07 EST



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(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/