]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
mount.2: ERRORS: add EINVAL for bind mount of mount namespace inode
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 3 Jul 2020 10:38:18 +0000 (12:38 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 3 Jul 2020 10:38:18 +0000 (12:38 +0200)
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>
man2/mount.2

index 143a45e7f6a63d39a4f5395262baf57aac4eed9c..be3794a5fdf3cd64b15a6a913bb4a932e1ffc4b6 100644 (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 ,