The patch titled Subject: pidns: use task_active_pid_ns in do_notify_parent has been added to the -mm tree. Its filename is pidns-use-task_active_pid_ns-in-do_notify_parent.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Eric W. Biederman <ebiederm@xxxxxxxxxxxx> Subject: pidns: use task_active_pid_ns in do_notify_parent Using task_active_pid_ns is more robust because it works even after we have called exit_namespaces. This change allows us to have parent processes that are zombies. Normally a zombie parent processes is crazy and the last thing you would want to have but in the case of not letting the init process of a pid namespace be reaped until all of it's children are dead and reaped a zombie parent process is exactly what we want. Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Pavel Emelyanov <xemul@xxxxxxxxxxxxx> Cc: Cyrill Gorcunov <gorcunov@xxxxxxxxxx> Cc: Louis Rilling <louis.rilling@xxxxxxxxxxx> Cc: Mike Galbraith <efault@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/signal.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff -puN kernel/signal.c~pidns-use-task_active_pid_ns-in-do_notify_parent kernel/signal.c --- a/kernel/signal.c~pidns-use-task_active_pid_ns-in-do_notify_parent +++ a/kernel/signal.c @@ -1666,19 +1666,18 @@ bool do_notify_parent(struct task_struct info.si_signo = sig; info.si_errno = 0; /* - * we are under tasklist_lock here so our parent is tied to - * us and cannot exit and release its namespace. + * We are under tasklist_lock here so our parent is tied to + * us and cannot change. * - * the only it can is to switch its nsproxy with sys_unshare, - * bu uncharing pid namespaces is not allowed, so we'll always - * see relevant namespace + * task_active_pid_ns will always return the same pid namespace + * until a task passes through release_task. * * write_lock() currently calls preempt_disable() which is the * same as rcu_read_lock(), but according to Oleg, this is not * correct to rely on this */ rcu_read_lock(); - info.si_pid = task_pid_nr_ns(tsk, tsk->parent->nsproxy->pid_ns); + info.si_pid = task_pid_nr_ns(tsk, task_active_pid_ns(tsk->parent)); info.si_uid = map_cred_ns(__task_cred(tsk), task_cred_xxx(tsk->parent, user_ns)); rcu_read_unlock(); _ Subject: Subject: pidns: use task_active_pid_ns in do_notify_parent Patches currently in -mm which might be from ebiederm@xxxxxxxxxxxx are linux-next.patch namespaces-fix-leak-on-fork-failure.patch connector-userns-replace-netlink-uses-of-cap_raised-with-capable.patch cred-remove-task_is_dead-from-__task_cred-validation.patch pidns-use-task_active_pid_ns-in-do_notify_parent.patch pidns-guarantee-that-the-pidns-init-will-be-the-last-pidns-process-reaped.patch pidns-make-killed-children-autoreap.patch syscalls-x86-add-__nr_kcmp-syscall-v8.patch c-r-procfs-add-arg_start-end-env_start-end-and-exit_code-members-to-proc-pid-stat.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html