Date: Sat, 23 May 2026 07:13:48 +0000 From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: b393aa8e30b5 - stable/15 - nullfs: do not allow to mount a vnode over itself Message-ID: <6a1153ac.3dc46.37853cee@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b393aa8e30b5911a5177b6aaacd5a62beea8e3d6 commit b393aa8e30b5911a5177b6aaacd5a62beea8e3d6 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2026-05-16 22:16:45 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-05-23 06:56:13 +0000 nullfs: do not allow to mount a vnode over itself PR: 275570 (cherry picked from commit 7bdf2b5d5fbabfc8749c4ff6e618c3e843b14de0) --- sys/fs/nullfs/null_vfsops.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index c3eec727aeea..0ec4f9c87297 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -151,6 +151,14 @@ nullfs_mount(struct mount *mp) */ lowerrootvp = ndp->ni_vp; + /* + * Do not allow to mount a vnode over itself. + */ + if (mp->mnt_vnodecovered == lowerrootvp) { + vput(lowerrootvp); + return (EDEADLK); + } + /* * Check multi null mount to avoid `lock against myself' panic. */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a1153ac.3dc46.37853cee>
