Re: [PATCH] mnt: don't allow to detach the namespace root

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 02:24:36PM +0100, Al Viro wrote: > On Tue, Oct 07, 2014 at 04:00:12PM +0400, Andrey Vagin wrote: > > This patch fixes a bug, which is triggered by following code: > > while (1) { > > if (umount2("/", MNT_DETACH) || > > setns(fd, CLONE_NEWNS)) > >

Re: [PATCH] mnt: don't allow to detach the namespace root

2014-10-07 Thread Al Viro
On Tue, Oct 07, 2014 at 04:00:12PM +0400, Andrey Vagin wrote: > This patch fixes a bug, which is triggered by following code: > while (1) { > if (umount2("/", MNT_DETACH) || > setns(fd, CLONE_NEWNS)) > return break; > } Excuse me, but that makes no sense whatsoeve

[PATCH] mnt: don't allow to detach the namespace root

2014-10-07 Thread Andrey Vagin
This patch fixes a bug, which is triggered by following code: while (1) { if (umount2("/", MNT_DETACH) || setns(fd, CLONE_NEWNS)) return break; } [ 260.548301] [ cut here ] [ 260.550941] kernel BUG at /build/buildd/linux-3.13.0/fs/pnode