[Bug 265311] silly mount() arguments with MNT_UPDATE and MNT_UNION can cause kernel page-fault

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 16 May 2024 01:02:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265311

--- Comment #1 from commit-hook@FreeBSD.org ---
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(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.