Commit 5a101d83 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mount: skip the criu's mount namespace if tasks live in another mntns

Currently here is a bug, because when we see criu's mount namespace,
we go to the "out" mark and don't validate mounts.
Reported-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 1ebd56b0
...@@ -2092,11 +2092,12 @@ static int walk_mnt_ns(int (*cb)(struct ns_id *, struct mount_info *, void *), v ...@@ -2092,11 +2092,12 @@ static int walk_mnt_ns(int (*cb)(struct ns_id *, struct mount_info *, void *), v
* Otherwise, the necessary list of mounts * Otherwise, the necessary list of mounts
* will be collected below. * will be collected below.
*/ */
if (!(root_ns_mask & CLONE_NEWNS)) { if ((root_ns_mask & CLONE_NEWNS))
continue;
mntinfo = collect_mntinfo(ns); mntinfo = collect_mntinfo(ns);
if (mntinfo == NULL) if (mntinfo == NULL)
goto err; goto err;
}
/* /*
* Mount namespaces are dumped only if the root task lives in * Mount namespaces are dumped only if the root task lives in
* its own mntns, so we can stop enumeration of namespaces. * its own mntns, so we can stop enumeration of namespaces.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment