svn commit: r184417 - in stable/7/sys: . kern
Christian S.J. Peron
csjp at FreeBSD.org
Tue Oct 28 10:01:17 PDT 2008
Author: csjp
Date: Tue Oct 28 17:01:16 2008
New Revision: 184417
URL: http://svn.freebsd.org/changeset/base/184417
Log:
MFC SVN rev 181647
- Reduce the scope of the vnode lock such that it does not
cover the various copyouts associated with initializing
the process's argv/env data in userspace. It is possible
that these copyout operations can fault under memory
pressure, possibly resulting in dead locks.
Approved by: re@ (kib)
Modified:
stable/7/sys/ (props changed)
stable/7/sys/kern/kern_exec.c
Modified: stable/7/sys/kern/kern_exec.c
==============================================================================
--- stable/7/sys/kern/kern_exec.c Tue Oct 28 15:17:59 2008 (r184416)
+++ stable/7/sys/kern/kern_exec.c Tue Oct 28 17:01:16 2008 (r184417)
@@ -476,6 +476,11 @@ 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, td);
+ /*
* Copy out strings (args and env) and initialize stack base
*/
if (p->p_sysent->sv_copyout_strings)
@@ -512,7 +517,6 @@ interpret:
}
/* close files on exec */
- VOP_UNLOCK(imgp->vp, 0, td);
fdcloseexec(td);
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY, td);
More information about the svn-src-all
mailing list