diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index b4f3ccc080f..09979493d57 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -513,6 +513,11 @@ interpret: goto interpret; } + /* + * NB: We unlock the vnode here because it is believed that none + * of the sv_copyout_strings/sv_fixup operations require the vnode. + */ + VOP_UNLOCK(imgp->vp, 0); /* * Copy out strings (args and env) and initialize stack base */ @@ -550,7 +555,6 @@ interpret: } /* close files on exec */ - VOP_UNLOCK(imgp->vp, 0); fdcloseexec(td); vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);