It is safe to use the new task_active_pid_ns() when the process hasa valid (fully initialized) 'struct pid'. copy_namespaces() andcreate_new_namespaces() operate on the _parent's_ 'struct pid' whichis valid.