Commit 3635f2c4 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mnt: Relax checks for top-mount in validate_mounts

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
parent c75b7ab6
...@@ -313,7 +313,11 @@ static int validate_mounts(struct mount_info *info, bool call_plugins) ...@@ -313,7 +313,11 @@ static int validate_mounts(struct mount_info *info, bool call_plugins)
struct mount_info *m, *t; struct mount_info *m, *t;
for (m = info; m; m = m->next) { for (m = info; m; m = m->next) {
if (m->parent && m->parent->shared_id) { if (m->parent == NULL)
/* root mount can be any */
continue;
if (m->parent->shared_id) {
struct mount_info *ct; struct mount_info *ct;
if (list_empty(&m->parent->mnt_share)) if (list_empty(&m->parent->mnt_share))
continue; continue;
...@@ -333,7 +337,7 @@ static int validate_mounts(struct mount_info *info, bool call_plugins) ...@@ -333,7 +337,7 @@ static int validate_mounts(struct mount_info *info, bool call_plugins)
} }
} }
if (m->parent && !fsroot_mounted(m)) { if (!fsroot_mounted(m)) {
list_for_each_entry(t, &m->mnt_bind, mnt_bind) { list_for_each_entry(t, &m->mnt_bind, mnt_bind) {
if (fsroot_mounted(t) || t->parent == NULL) if (fsroot_mounted(t) || t->parent == NULL)
break; break;
...@@ -359,9 +363,6 @@ static int validate_mounts(struct mount_info *info, bool call_plugins) ...@@ -359,9 +363,6 @@ static int validate_mounts(struct mount_info *info, bool call_plugins)
} }
} }
if (m->parent == NULL)
continue;
list_for_each_entry(t, &m->parent->children, siblings) { list_for_each_entry(t, &m->parent->children, siblings) {
int tlen, mlen; int tlen, mlen;
......
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