vfs: Fix a regression in mounting proc
Gao feng <email@example.com> reported that commit
userns: Better restrictions on when proc and sysfs can be mounted
caused a regression on mounting a new instance of proc in a mount
namespace created with user namespace privileges, when binfmt_misc
is mounted on /proc/sys/fs/binfmt_misc.
This is an unintended regression caused by the absolutely bogus empty
directory check in fs_fully_visible. The check fs_fully_visible replaced
didn't even bother to attempt to verify proc was fully visible and
hiding proc files with any kind of mount is rare. So for now fix
the userspace regression by allowing directory with nlink == 1
as /proc/sys/fs/binfmt_misc has.
I will have a better patch but it is not stable material, or
last minute kernel material. So it will have to wait.
Acked-by: Serge Hallyn <firstname.lastname@example.org>
Acked-by: Gao feng <email@example.com>
Tested-by: Gao feng <firstname.lastname@example.org>
Signed-off-by: "Eric W. Biederman" <email@example.com>
1 file changed