Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/kern Pull up revision 1.18-1.19 via patch (requeste...
details: https://anonhg.NetBSD.org/src/rev/0ce965dbbe1b
branches: netbsd-1-6
changeset: 530773:0ce965dbbe1b
user: tron <tron%NetBSD.org@localhost>
date: Thu Oct 02 09:51:45 2003 +0000
description:
Pull up revision 1.18-1.19 via patch (requested by junyoung in ticket #1488):
count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).
diffstat:
sys/kern/exec_ecoff.c | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diffs (50 lines):
diff -r f488ae9530c0 -r 0ce965dbbe1b sys/kern/exec_ecoff.c
--- a/sys/kern/exec_ecoff.c Thu Oct 02 09:51:38 2003 +0000
+++ b/sys/kern/exec_ecoff.c Thu Oct 02 09:51:45 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_ecoff.c,v 1.16 2001/11/12 15:25:02 lukem Exp $ */
+/* $NetBSD: exec_ecoff.c,v 1.16.10.1 2003/10/02 09:51:45 tron Exp $ */
/*
* Copyright (c) 1994 Adam Glass
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exec_ecoff.c,v 1.16 2001/11/12 15:25:02 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_ecoff.c,v 1.16.10.1 2003/10/02 09:51:45 tron Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -229,6 +229,7 @@
struct ecoff_exechdr *execp, struct vnode *vp)
{
struct ecoff_aouthdr *eap = &execp->a;
+ int error;
epp->ep_taddr = ECOFF_SEGMENT_ALIGN(execp, eap->text_start);
epp->ep_tsize = eap->tsize;
@@ -236,20 +237,9 @@
epp->ep_dsize = eap->dsize + eap->bsize;
epp->ep_entry = eap->entry;
- /*
- * check if vnode is in open for writing, because we want to
- * demand-page out of it. if it is, don't do it, for various
- * reasons
- */
- if ((eap->tsize != 0 || eap->dsize != 0) &&
- vp->v_writecount != 0) {
-#ifdef DIAGNOSTIC
- if (vp->v_flag & VTEXT)
- panic("exec: a VTEXT vnode has writecount != 0\n");
-#endif
- return ETXTBSY;
- }
- vp->v_flag |= VTEXT;
+ error = vn_marktext(vp);
+ if (error)
+ return (error);
/* set up command for text segment */
NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_pagedvn, eap->tsize,
Home |
Main Index |
Thread Index |
Old Index