Page MenuHomeFreeBSD

vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done
ClosedPublic

Authored by kib on May 15 2024, 10:01 AM.
Tags
None
Referenced Files
F147012635: D45208.id138592.diff
Sat, Mar 7, 2:39 PM
F146985426: D45208.id138592.diff
Sat, Mar 7, 8:53 AM
Unknown Object (File)
Sat, Feb 28, 1:01 AM
Unknown Object (File)
Thu, Feb 26, 10:21 AM
Unknown Object (File)
Jan 7 2026, 10:14 PM
Unknown Object (File)
Jan 7 2026, 10:13 PM
Unknown Object (File)
Jan 5 2026, 8:14 PM
Unknown Object (File)
Dec 31 2025, 10:45 AM
Subscribers

Details

Summary
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>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.May 15 2024, 10:01 AM

This looks like the correct fix. One other unrelated nit.

sys/kern/vfs_mount.c
1526

Incorrect <tab> rather than <space> between &= and ~(MNT_UPDATE.

This revision is now accepted and ready to land.May 15 2024, 7:47 PM