Re: [lxc-devel] [PATCH] pivot_root: umount ., not /

2014-09-30 Thread Dwight Engen
On Mon, 29 Sep 2014 22:51:35 +
Serge Hallyn serge.hal...@ubuntu.com wrote:

 This fixes pivot_root on 3.11 and older kernels.
 
 Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com

Acked-by: Dwight Engen dwight.en...@oracle.com
Tested-by: Dwight Engen dwight.en...@oracle.com

Thanks Serge!

 ---
  src/lxc/conf.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/lxc/conf.c b/src/lxc/conf.c
 index 31673d5..e8979c9 100644
 --- a/src/lxc/conf.c
 +++ b/src/lxc/conf.c
 @@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char
 *rootfs, const char *pivotdir) SYSERROR(Error entering oldroot);
   goto fail;
   }
 - if (umount2(/, MNT_DETACH)  0) {
 + if (umount2(., MNT_DETACH)  0) {
   SYSERROR(Error detaching old root);
   goto fail;
   }

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] pivot_root: umount ., not /

2014-09-30 Thread Serge Hallyn
Quoting Dwight Engen (dwight.en...@oracle.com):
 On Mon, 29 Sep 2014 22:51:35 +
 Serge Hallyn serge.hal...@ubuntu.com wrote:
 
  This fixes pivot_root on 3.11 and older kernels.
  
  Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com
 
 Acked-by: Dwight Engen dwight.en...@oracle.com
 Tested-by: Dwight Engen dwight.en...@oracle.com
 
 Thanks Serge!

Andy's the one who caught it, and that after i forced his
laptop to reboot.  Thanks Andy :)

   src/lxc/conf.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/src/lxc/conf.c b/src/lxc/conf.c
  index 31673d5..e8979c9 100644
  --- a/src/lxc/conf.c
  +++ b/src/lxc/conf.c
  @@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char
  *rootfs, const char *pivotdir) SYSERROR(Error entering oldroot);
  goto fail;
  }
  -   if (umount2(/, MNT_DETACH)  0) {
  +   if (umount2(., MNT_DETACH)  0) {
  SYSERROR(Error detaching old root);
  goto fail;
  }
 
 ___
 lxc-devel mailing list
 lxc-devel@lists.linuxcontainers.org
 http://lists.linuxcontainers.org/listinfo/lxc-devel
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


[lxc-devel] [PATCH] pivot_root: umount ., not /

2014-09-29 Thread Serge Hallyn
This fixes pivot_root on 3.11 and older kernels.

Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com
---
 src/lxc/conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 31673d5..e8979c9 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char *rootfs, 
const char *pivotdir)
SYSERROR(Error entering oldroot);
goto fail;
}
-   if (umount2(/, MNT_DETACH)  0) {
+   if (umount2(., MNT_DETACH)  0) {
SYSERROR(Error detaching old root);
goto fail;
}
-- 
2.1.0

___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] pivot_root: umount ., not /

2014-09-29 Thread Stéphane Graber
On Mon, Sep 29, 2014 at 10:51:35PM +, Serge Hallyn wrote:
 This fixes pivot_root on 3.11 and older kernels.
 
 Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com

Got to love one char bugfixes :)

Acked-by: Stéphane Graber stgra...@ubuntu.com

 ---
  src/lxc/conf.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/lxc/conf.c b/src/lxc/conf.c
 index 31673d5..e8979c9 100644
 --- a/src/lxc/conf.c
 +++ b/src/lxc/conf.c
 @@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char *rootfs, 
 const char *pivotdir)
   SYSERROR(Error entering oldroot);
   goto fail;
   }
 - if (umount2(/, MNT_DETACH)  0) {
 + if (umount2(., MNT_DETACH)  0) {
   SYSERROR(Error detaching old root);
   goto fail;
   }
 -- 
 2.1.0
 
 ___
 lxc-devel mailing list
 lxc-devel@lists.linuxcontainers.org
 http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com


signature.asc
Description: Digital signature
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel


Re: [lxc-devel] [PATCH] pivot_root: umount ., not /

2014-09-29 Thread Michael H. Warfield
On Mon, 2014-09-29 at 18:56 -0400, Stéphane Graber wrote:
 On Mon, Sep 29, 2014 at 10:51:35PM +, Serge Hallyn wrote:
  This fixes pivot_root on 3.11 and older kernels.
  
  Signed-off-by: Serge Hallyn serge.hal...@ubuntu.com

 Got to love one char bugfixes :)

+1

 Acked-by: Stéphane Graber stgra...@ubuntu.com
 
  ---
   src/lxc/conf.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/src/lxc/conf.c b/src/lxc/conf.c
  index 31673d5..e8979c9 100644
  --- a/src/lxc/conf.c
  +++ b/src/lxc/conf.c
  @@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char 
  *rootfs, const char *pivotdir)
  SYSERROR(Error entering oldroot);
  goto fail;
  }
  -   if (umount2(/, MNT_DETACH)  0) {
  +   if (umount2(., MNT_DETACH)  0) {
  SYSERROR(Error detaching old root);
  goto fail;
  }
  -- 
  2.1.0
  
  ___
  lxc-devel mailing list
  lxc-devel@lists.linuxcontainers.org
  http://lists.linuxcontainers.org/listinfo/lxc-devel
 
 ___
 lxc-devel mailing list
 lxc-devel@lists.linuxcontainers.org
 http://lists.linuxcontainers.org/listinfo/lxc-devel

-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  m...@wittsend.com
   /\/\|=mhw=|\/\/  | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9  | An optimist believes we live in the best of all
 PGP Key: 0x674627FF| possible worlds.  A pessimist is sure of it!



signature.asc
Description: This is a digitally signed message part
___
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel