Commit f60109f2 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mnt: Check for ns being mnt before dumping

Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d49fd40e
......@@ -1899,6 +1899,9 @@ int dump_mnt_namespaces(void)
int ret = 0, n = 0;
for (ns = ns_ids; ns; ns = ns->next) {
if (!(ns->nd->cflag & CLONE_NEWNS))
continue;
/* Skip current namespaces, which are in the list too */
if (ns->pid == getpid()) {
if (!(root_ns_mask & CLONE_NEWNS))
......@@ -1908,11 +1911,7 @@ int dump_mnt_namespaces(void)
continue;
}
if (!(ns->nd->cflag & CLONE_NEWNS))
continue;
n++;
if (n == 2 && check_mnt_id()) {
pr_err("Nested mount namespaces are not supported "
"without mnt_id in fdinfo\n");
......
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