mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
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: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
6bc74e35fe
commit
65b3a95c9b
11
mount.c
11
mount.c
@@ -2087,11 +2087,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))
|
||||||
mntinfo = collect_mntinfo(ns);
|
continue;
|
||||||
if (mntinfo == NULL)
|
|
||||||
goto err;
|
mntinfo = collect_mntinfo(ns);
|
||||||
}
|
if (mntinfo == NULL)
|
||||||
|
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.
|
||||||
|
Reference in New Issue
Block a user