From c0721f5f93083c622e2118a55eb1a2ef1725bc4b Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 17 Jan 2009 14:24:52 -0800 Subject: [PATCH] Reorder an unlock to avoid a recursive vnode lock in the sys_mount() code. This fixes a panic for double-mount_null cases. Reported-by: Nicolas Thery Submitted-by: Johannes Hofmann --- sys/kern/vfs_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 888507304c..9e1c5e0380 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -380,8 +380,8 @@ update: /* XXX get the root of the fs and cache_setvp(mnt_ncmountpt...) */ vp->v_flag &= ~VMOUNT; mountlist_insert(mp, MNTINS_LAST); - checkdirs(&mp->mnt_ncmounton, &mp->mnt_ncmountpt); vn_unlock(vp); + checkdirs(&mp->mnt_ncmounton, &mp->mnt_ncmountpt); error = vfs_allocate_syncvnode(mp); vfs_unbusy(mp); error = VFS_START(mp, 0); -- 2.41.0