From: Michael Kerrisk Date: Fri, 3 Jul 2020 10:38:18 +0000 (+0200) Subject: mount.2: ERRORS: add EINVAL for bind mount of mount namespace inode X-Git-Tag: man-pages-5.08~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16170fbc5c798071d5af9cfb1719d13e1d8f1cc7;p=thirdparty%2Fman-pages.git 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 --- diff --git a/man2/mount.2 b/man2/mount.2 index 143a45e7f6..be3794a5fd 100644 --- a/man2/mount.2 +++ b/man2/mount.2 @@ -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 ,