Summary: | silly mount() arguments with MNT_UPDATE and MNT_UNION can cause kernel page-fault | ||
---|---|---|---|
Product: | Base System | Reporter: | Robert Morris <rtm> |
Component: | kern | Assignee: | Konstantin Belousov <kib> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | emaste, mckusick |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
Robert Morris
2022-07-19 13:32:40 UTC
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=21ccdb4119afdfdfeaa80e9c8514171c65b35862 commit 21ccdb4119afdfdfeaa80e9c8514171c65b35862 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-15 09:54:49 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-16 01:00:26 +0000 vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done The file system that handles updating the mount point might do lookups during the update, in which case it could find the flag MNT_UNION set on the mp while mount point is still not updated. In particular, the rootvp->v_mount->mnt_vnodecovered is not yet set. Delay setting MNT_UNION until the mount is performed. PR: 265311 Reported by: Robert Morris <rtm@lcs.mit.edu> Reviewed by: mckusick, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D45208 sys/kern/vfs_mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=625a622cc6511e250470ee3f84a8553c7c734de6 commit 625a622cc6511e250470ee3f84a8553c7c734de6 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-15 09:54:49 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-23 00:26:43 +0000 vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done PR: 265311 (cherry picked from commit 21ccdb4119afdfdfeaa80e9c8514171c65b35862) sys/kern/vfs_mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2f2f59132ad365203c5deb8ed16202a78585c1 commit 2a2f2f59132ad365203c5deb8ed16202a78585c1 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-05-15 09:54:49 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2024-05-22 23:47:23 +0000 vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done PR: 265311 (cherry picked from commit 21ccdb4119afdfdfeaa80e9c8514171c65b35862) sys/kern/vfs_mount.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) |