summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2/imgact_coff.c
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1995-09-13 02:12:51 +0000
committersef <sef@FreeBSD.org>1995-09-13 02:12:51 +0000
commit8925d45122fe83df78d676a53306b0b2faade050 (patch)
tree84c9a37336133bb6bab449551046237d1dacc67e /sys/i386/ibcs2/imgact_coff.c
parentceb4b5097101339e2b70f809790947544f27ec45 (diff)
downloadFreeBSD-src-8925d45122fe83df78d676a53306b0b2faade050.zip
FreeBSD-src-8925d45122fe83df78d676a53306b0b2faade050.tar.gz
Unlock the vnode after checking permissions; this is necessary to prevent
a panic whenever an iBCS2 file is exec'd. Obtained from: FreeBSD
Diffstat (limited to 'sys/i386/ibcs2/imgact_coff.c')
-rw-r--r--sys/i386/ibcs2/imgact_coff.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/i386/ibcs2/imgact_coff.c b/sys/i386/ibcs2/imgact_coff.c
index b866d1d..9529e11 100644
--- a/sys/i386/ibcs2/imgact_coff.c
+++ b/sys/i386/ibcs2/imgact_coff.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: imgact_coff.c,v 1.5 1995/08/24 10:30:36 davidg Exp $
+ * $Id: imgact_coff.c,v 1.6 1995/08/28 09:18:36 julian Exp $
*/
#include <sys/param.h>
@@ -198,6 +198,12 @@ coff_load_file(struct proc *p, char *name)
if (error = VOP_OPEN(vnodep, FREAD, p->p_ucred, p))
goto fail;
+ /*
+ * Lose the lock on the vnode. It's no longer needed, and must not
+ * exist for the pagefault paging to work below.
+ */
+ VOP_UNLOCK(vnodep);
+
if (error = vm_mmap(kernel_map,
(vm_offset_t *) &ptr,
PAGE_SIZE,
OpenPOWER on IntegriCloud