Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102797804
D37198.id112340.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
860 B
Referenced Files
None
Subscribers
None
D37198.id112340.diff
View Options
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1259,6 +1259,12 @@
* if so find the root of the mounted filesystem.
*/
do {
+ /*
+ * Ensure that the v_mounthere update from
+ * vfs_domount() is visible if we saw the
+ * VIRF_MOUNTPOINT flag.
+ */
+ atomic_thread_fence_acq();
mp = dp->v_mountedhere;
KASSERT(mp != NULL,
("%s: NULL mountpoint for VIRF_MOUNTPOINT vnode", __func__));
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1202,8 +1202,9 @@
MNT_IUNLOCK(mp);
VI_LOCK(vp);
- vn_irflag_set_locked(vp, VIRF_MOUNTPOINT);
vp->v_mountedhere = mp;
+ atomic_thread_fence_rel(); /* see vfs_lookup() */
+ vn_irflag_set_locked(vp, VIRF_MOUNTPOINT);
VI_UNLOCK(vp);
cache_purge(vp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 8:10 AM (15 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14693142
Default Alt Text
D37198.id112340.diff (860 B)
Attached To
Mode
D37198: vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock
Attached
Detach File
Event Timeline
Log In to Comment