Commit 7981ea46 by Serge Hallyn Committed by Stéphane Graber

pivot_root: umount ., not /

This fixes pivot_root on 3.11 and older kernels. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 888cf064
...@@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char *rootfs, const char *pivotdir) ...@@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char *rootfs, const char *pivotdir)
SYSERROR("Error entering oldroot"); SYSERROR("Error entering oldroot");
goto fail; goto fail;
} }
if (umount2("/", MNT_DETACH) < 0) { if (umount2(".", MNT_DETACH) < 0) {
SYSERROR("Error detaching old root"); SYSERROR("Error detaching old root");
goto fail; goto fail;
} }
......
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