From: Serge Hallyn Date: Fri, 9 Jan 2015 22:00:28 +0000 (+0000) Subject: Fix reversed args in mount call X-Git-Tag: lxc-1.1.0.rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88322f776c8411048217add42d15d610b28317e2;p=thirdparty%2Flxc.git 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: riya khanna > Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 72181dd52..907200279 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1513,7 +1513,7 @@ int prepare_ramfs_root(char *root) 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"); return -1; }