> @@ -1115,6 +1183,9 @@ static int populate_mnt_ns(int ns_pid) > if (!pms) > return -1; > > + if (validate_mounts(pms)) Why not put this call into collect_shared()? > + return -1; > + > return mnt_tree_for_each(pms, do_mount_one); > err: > while (pms) { >