 +	return 0;
 +}
 +
-+/*
+ /*
   * This function expects the tasklist_lock write-locked.
   */
- static void __exit_signal(struct task_struct *tsk)
-@@ -1049,6 +1065,9 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
+@@ -987,6 +1003,9 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
  	uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
  	struct waitid_info *infop;
  

+	}
 
 	if (clone_flags & CLONE_PARENT_SETTID)
 		put_user(nr, parent_tidptr);
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index f6c5d33..2ef42a9 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -17,6 +17,7 @@
 #include <linux/export.h>
 #include <linux/nsproxy.h>
 #include <linux/init_task.h>

   ancestors.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
 include/uapi/linux/capability.h |  5 ++-
 kernel/exit.c                   | 23 ++++++++++
 kernel/fork.c                   |  7 +++
 kernel/nsproxy.c                | 79 ++++++++++++++++++++++++++++++++-
 4 files changed, 112 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/capability.h b/include/uapi/linux/capability.h
index c6ca33034147..646b37b47ab1 100644
--- a/include/uapi/linux/capability.h
+++ b/include/uapi/linux/capability.h
@@ -416,8 +416,11 @@ struct vfs_ns_cap_data {
 /* Allow writing to ns_last_pid */
 
 #define CAP_CHECKPOINT_RESTORE	40
+/* Allow a one level deep NS to return to the init_task NS */
 
-#define CAP_LAST_CAP         CAP_CHECKPOINT_RESTORE
+#define CAP_ADMIN_NS		41
+
+#define CAP_LAST_CAP         CAP_ADMIN_NS
 
 #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
 
diff --git a/kernel/exit.c b/kernel/exit.c
index d13d67fc5f4e..03d3c9f7d2b6 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -86,6 +86,22 @@ static void __unhash_process(struct task_struct *p, bool group_dead)
 	list_del_rcu(&p->thread_node);
 }
 
+/*
+ * The tasklist_lock read lock must be held in.  This function returns
+ * root level namespace pid in a case where the parent is in a higher
+ * level name space than the child.
