/proc/fs/nfsfs/servers and /proc/fs/nfsfs/volumes resolve through /proc/net into /proc/self/net. Create them with proc_self_symlink() so nothing can be mounted on the links themselves. Signed-off-by: Christian Brauner (Amutable) --- fs/nfs/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 60386330aeec..97e363ac7a3e 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -1528,11 +1528,11 @@ int __init nfs_fs_proc_init(void) goto error_0; /* a file of servers with which we're dealing */ - if (!proc_symlink("fs/nfsfs/servers", NULL, "../../net/nfsfs/servers")) + if (!proc_self_symlink("fs/nfsfs/servers", NULL, "../../net/nfsfs/servers")) goto error_1; /* a file of volumes that we have mounted */ - if (!proc_symlink("fs/nfsfs/volumes", NULL, "../../net/nfsfs/volumes")) + if (!proc_self_symlink("fs/nfsfs/volumes", NULL, "../../net/nfsfs/volumes")) goto error_1; return 0; -- 2.53.0