From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: mtk.manpages@gmail.com, Andy Lutomirski <luto@amacapital.net>,
Andrey Wagin <avagin@gmail.com>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] umount.2: Document the effect of shared subtrees on umount
Date: Mon, 02 Feb 2015 16:36:13 +0100 [thread overview]
Message-ID: <54CF996D.6060309@gmail.com> (raw)
In-Reply-To: <87lho0cd5w.fsf_-_@x220.int.ebiederm.org>
On 10/28/2014 06:33 PM, Eric W. Biederman wrote:
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
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/
next prev parent reply other threads:[~2015-02-02 15:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 1:04 [PATCH] umount.2: Correct the description of MNT_DETACH Eric W. Biederman
2014-09-30 1:28 ` Andy Lutomirski
2014-09-30 2:15 ` Eric W. Biederman
2014-09-30 2:16 ` Andy Lutomirski
2014-10-28 13:43 ` Michael Kerrisk (man-pages)
2014-10-28 17:31 ` Eric W. Biederman
2014-10-28 17:33 ` [PATCH] umount.2: Document the effect of shared subtrees on umount Eric W. Biederman
2015-02-02 15:36 ` Michael Kerrisk (man-pages) [this message]
2015-02-02 15:34 ` [PATCH] umount.2: Correct the description of MNT_DETACH Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54CF996D.6060309@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=avagin@gmail.com \
--cc=ebiederm@xmission.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).