Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754065AbbBBPgT (ORCPT ); Mon, 2 Feb 2015 10:36:19 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:56764 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752914AbbBBPgQ (ORCPT ); Mon, 2 Feb 2015 10:36:16 -0500 Message-ID: <54CF996D.6060309@gmail.com> Date: Mon, 02 Feb 2015 16:36:13 +0100 From: "Michael Kerrisk (man-pages)" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "Eric W. Biederman" CC: mtk.manpages@gmail.com, Andy Lutomirski , Andrey Wagin , Linux FS Devel , Al Viro , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] umount.2: Document the effect of shared subtrees on umount References: <87lhp12a2i.fsf@x220.int.ebiederm.org> <87oatxzwex.fsf@x220.int.ebiederm.org> <544F9D7D.40301@gmail.com> <87r3xscd88.fsf@x220.int.ebiederm.org> <87lho0cd5w.fsf_-_@x220.int.ebiederm.org> In-Reply-To: <87lho0cd5w.fsf_-_@x220.int.ebiederm.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2005 Lines: 56 On 10/28/2014 06:33 PM, Eric W. Biederman wrote: > > Signed-off-by: Eric W. Biederman Thanks, Eric. Again, sorry for the delay. I've applied this patch. Cheers, Michael > --- > man2/umount.2 | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/man2/umount.2 b/man2/umount.2 > index aea39d8306fe..a0120b2fc811 100644 > --- a/man2/umount.2 > +++ b/man2/umount.2 > @@ -97,6 +97,24 @@ Don't dereference > if it is a symbolic link. > This flag allows security problems to be avoided in set-user-ID-\fIroot\fP > programs that allow unprivileged users to unmount filesystems. > + > +.P > +Shared mount points cause any mount activity on that mount point > +including umounts to be forwarded to every shared mount point in it's > +peer group and every slave mount of that peer group. This means that > +umount of any peer in a set of shared mounts will cause all of it's > +peers to be unmounted and all of their slaves to be unmounted as well. > + > +This propogagtion of unmount activity can be particularly surprising > +on systems where every mount point is shared by default. On such > +systems recursively bind mounting the root directory of the filesystem > +onto a subdirectory and then later unmounting that subdirectory with > +.BR MNT_DETACH > +will cause every mount in the mount namespace to be lazily unmounted. > + > +To ensure umount does not propagate the mount point may be > +remounted with MS_REC | MS_PRIVATE prior to umount being called. > + > .SH RETURN VALUE > On success, zero is returned. > On error, \-1 is returned, and > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/