Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144744695
D26160.id76271.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
853 B
Referenced Files
None
Subscribers
None
D26160.id76271.diff
View Options
Index: head/sys/kern/vfs_mount.c
===================================================================
--- head/sys/kern/vfs_mount.c
+++ head/sys/kern/vfs_mount.c
@@ -969,11 +969,14 @@
if ((error = VFS_MOUNT(mp)) != 0 ||
(error1 = VFS_STATFS(mp, &mp->mnt_stat)) != 0 ||
(error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) {
+ rootvp = NULL;
if (error1 != 0) {
error = error1;
rootvp = vfs_cache_root_clear(mp);
- if (rootvp != NULL)
+ if (rootvp != NULL) {
+ vhold(rootvp);
vrele(rootvp);
+ }
if ((error1 = VFS_UNMOUNT(mp, 0)) != 0)
printf("VFS_UNMOUNT returned %d\n", error1);
}
@@ -983,6 +986,10 @@
VI_LOCK(vp);
vp->v_iflag &= ~VI_MOUNT;
VI_UNLOCK(vp);
+ if (rootvp != NULL) {
+ vn_seqc_write_end(rootvp);
+ vdrop(rootvp);
+ }
vn_seqc_write_end(vp);
vrele(vp);
return (error);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 13, 12:55 AM (12 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28672163
Default Alt Text
D26160.id76271.diff (853 B)
Attached To
Mode
D26160: fix panic when VFS_FSSTAT() fails during an NFS mount
Attached
Detach File
Event Timeline
Log In to Comment