Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/uvm pullup 1.27->1.28 (cgd)



details:   https://anonhg.NetBSD.org/src/rev/0e74fdf988ed
branches:  netbsd-1-4
changeset: 469194:0e74fdf988ed
user:      perry <perry%NetBSD.org@localhost>
date:      Wed Jul 07 00:08:57 1999 +0000

description:
pullup 1.27->1.28 (cgd)

diffstat:

 sys/uvm/uvm_mmap.c |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r 6acc4b4fe50f -r 0e74fdf988ed sys/uvm/uvm_mmap.c
--- a/sys/uvm/uvm_mmap.c        Wed Jul 07 00:07:13 1999 +0000
+++ b/sys/uvm/uvm_mmap.c        Wed Jul 07 00:08:57 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_mmap.c,v 1.19 1999/03/25 18:48:53 mrg Exp $        */
+/*     $NetBSD: uvm_mmap.c,v 1.19.2.1 1999/07/07 00:08:57 perry Exp $  */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -396,6 +396,21 @@
        }
 
        /*
+        * XXX (in)sanity check.  We don't do proper datasize checking
+        * XXX for anonymous (or private writable) mmap().  However,
+        * XXX know that if we're trying to allocate more than the amount
+        * XXX remaining under our current data size limit, _that_ should
+        * XXX be disallowed.
+        */
+       if ((flags & MAP_ANON) != 0 ||
+           ((flags & MAP_PRIVATE) != 0 && (prot & PROT_WRITE) != 0)) {
+               if (size >
+                   (p->p_rlimit[RLIMIT_DATA].rlim_cur - ctob(p->p_vmspace->vm_dsize))) {
+                       return (ENOMEM);
+               }
+       }
+
+       /*
         * now let kernel internal function uvm_mmap do the work.
         */
 



Home | Main Index | Thread Index | Old Index