• Andrey Vagin's avatar
    net: mount sysfs in a new mount name-space · cec93fa1
    Andrey Vagin authored
    The current scheme is racy. It use open_detache_mount in a current
    name-space. If a mount namespace is created by someone else between
    mount and umount(detach) in open_detache_mount, the mount will be
    propagated in the new mntns, then it is detached in a current ns and
    rmdir fails, because it's still mounted in athother mntns.
    
    This patch creates a new mount namespace for mounting sysfs.
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    cec93fa1
net.c 11.7 KB