Commit 88322f77 by Serge Hallyn Committed by Stéphane Graber

Fix reversed args in mount call

Riya Khanna reported that with a ramfs rootfs the mount to make / rprivate was returning -EFAULT. NULL was being passed as the mount target. Pass "/" instead. Reported-by: 's avatarriya khanna <riyakhanna1983@gmail.com&gt;> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 1f76453a
...@@ -1513,7 +1513,7 @@ int prepare_ramfs_root(char *root) ...@@ -1513,7 +1513,7 @@ int prepare_ramfs_root(char *root)
return -1; return -1;
} }
if (mount(".", NULL, NULL, MS_REC | MS_PRIVATE, NULL)) { if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL)) {
SYSERROR("Failed to make . rprivate"); SYSERROR("Failed to make . rprivate");
return -1; return -1;
} }
......
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