On Sun, Apr 19, 2020 at 1:06 AM michael-dev <michael-dev@xxxxxxxxxxxxx> wrote: > > Am 16.04.2020 22:49, schrieb ebiederm@xxxxxxxxxxxx: > > Why all of the extra code motion and change? > > > > Your description sounds like only the first hunk is necessary. Did > > something else get mixed into this change? Or are all of the hunks > > necessary? > > Because after unsharing, pid_for_children is a dangling symlink. > So if (forkit) needs to be before /* wait for bind_ns_files_from_child() > */. > Moving this results in an overlapping use of the pid variable, so that > gets renamed. > Additionally, we cannot wait for the forkit child (bash) to exit before > triggering and waiting for the bind-mounting child to bind-mount the > persistent namespace. So forking and waiting for the forkit child (bash) > needs to become splitted. @Michael: I confim theproblem, and thanks for this fix. @Zak: an analogous fix is required for time namespaces. Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Author of "The Linux Programming Interface", http://blog.man7.org/