mount.2: ERRORS: add EINVAL for bind mount of mount namespace inode

See kernel commit 8823c079ba7136dc1948d6f6dcb5f8022bde438e
and the in fs/namespace.c::do_loopback():

        err = -EINVAL;
        if (mnt_ns_loop(old_path.dentry))
                goto out;

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-07-03 12:38:18 +02:00
parent b3bb3f58be
commit 16170fbc5c
1 changed files with 16 additions and 0 deletions

View File

@ -709,6 +709,22 @@ was attempted, but
was not a mount point, or was \(aq/\(aq.
.TP
.B EINVAL
A bind operation
.RB ( MS_BIND )
was requested where
.I source
referred a mount namespace magic link (i.e., a
.I /proc/[pid]/ns/mnt
magic link or a bind mount to such a link)
and the propagation type of the parent mount of
.I target
was
.BR MS_SHARED ,
.\" See commit 8823c079ba7136dc1948d6f6dcb5f8022bde438e
but propagation of the requested bind mount could lead to a circular
dependency that might prevent the mount namespace from ever being freed.
.TP
.B EINVAL
.I mountflags
includes more than one of
.BR MS_SHARED ,