Commit 1009985e authored by Pavel Emelyanov's avatar Pavel Emelyanov

collect: Check for ns being mnt before collecting

Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 443adb5a
......@@ -1867,6 +1867,9 @@ int collect_mnt_namespaces(void)
int ret = -1;
for (ns = ns_ids; ns; ns = ns->next) {
if (!(ns->nd->cflag & CLONE_NEWNS))
continue;
if (ns->pid == getpid()) {
if (!(root_ns_mask & CLONE_NEWNS)) {
mntinfo = collect_mntinfo(ns);
......@@ -1877,9 +1880,6 @@ int collect_mnt_namespaces(void)
continue;
}
if (!(ns->nd->cflag & CLONE_NEWNS))
continue;
pr_info("Dump MNT namespace (mountpoints) %d via %d\n",
ns->id, ns->pid);
pms = collect_mntinfo(ns);
......
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