summaryrefslogtreecommitdiff
path: root/fs/autofs/dev-ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-12-01 16:38:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-12-01 16:38:21 -0800
commitffbf700df204dd25a48a19979a126e37f5dd1e6a (patch)
treed92bf07cda161c226d90baef25423faa65a8acbf /fs/autofs/dev-ioctl.c
parentd0deeb803cd65c41c37ac106063c46c51d5d43ab (diff)
parent922a6f34c1756d2b0c35d9b2d915b8af19e85965 (diff)
Merge tag 'vfs-6.19-rc1.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull autofs update from Christian Brauner: "Prevent futile mount triggers in private mount namespaces. Fix a problematic loop in autofs when a mount namespace contains autofs mounts that are propagation private and there is no namespace-specific automount daemon to handle possible automounting. Previously, attempted path resolution would loop until MAXSYMLINKS was reached before failing, causing significant noise in the log. The fix adds a check in autofs ->d_automount() so that the VFS can immediately return EPERM in this case. Since the mount is propagation private, EPERM is the most appropriate error code" * tag 'vfs-6.19-rc1.autofs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: autofs: dont trigger mount if it cant succeed
Diffstat (limited to 'fs/autofs/dev-ioctl.c')
-rw-r--r--fs/autofs/dev-ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/autofs/dev-ioctl.c b/fs/autofs/dev-ioctl.c
index d8dd150cbd74..ed2efe4e97b2 100644
--- a/fs/autofs/dev-ioctl.c
+++ b/fs/autofs/dev-ioctl.c
@@ -381,6 +381,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
swap(sbi->oz_pgrp, new_pid);
sbi->pipefd = pipefd;
sbi->pipe = pipe;
+ sbi->mnt_ns_id = to_ns_common(current->nsproxy->mnt_ns)->ns_id;
sbi->flags &= ~AUTOFS_SBI_CATATONIC;
}
out: