• Andrew Vagin's avatar
    namespace: mark mount namespaces as populated after the forking stage · 3cbda075
    Andrew Vagin authored
    Currently we mark a mount namespaces as populated when a target process
    (ns_pid) switches into it. But if a process inherited the right
    namespace from a parent, it doesn't call do_restore_task_mnt_ns()
    and a namespace can remain unmarked.
    
    af55c059 ("mount: fix a race between restoring namespaces and file mappings")
    After this patch we could simplify logic around ns_populated. Currently
    it's a futex, but nodoby waits on it. We can set ns_populated when we
    are going to close namespace descriptors. To avoid additional locks, we
    can do this when all task pass the forking stage and don't start the
    next stage.
    
    v2: add a comment why we wait a CR_STATE_FORKING stage
    Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    3cbda075
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...