Source-Changes-HG archive

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

[src/trunk]: src/sys XXX Pass VM_PROT_NONE to uvm_vslock() as access_type. W...



details:   https://anonhg.NetBSD.org/src/rev/e52070390799
branches:  trunk
changeset: 473231:e52070390799
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed May 26 01:07:06 1999 +0000

description:
XXX Pass VM_PROT_NONE to uvm_vslock() as access_type.  Why are we even
vslocking here?!  copyout() on its own seems to suffice just about everwhere
else, and it's not like the process is going to exit; it's in a system
call!

diffstat:

 sys/compat/netbsd32/netbsd32_netbsd.c |  11 ++++++++---
 sys/kern/kern_sysctl.c                |  11 ++++++++---
 2 files changed, 16 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r 6691192502f8 -r e52070390799 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Wed May 26 01:05:24 1999 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Wed May 26 01:07:06 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.12 1999/05/05 20:01:04 thorpej Exp $     */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.13 1999/05/26 01:07:07 thorpej Exp $     */
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -3802,8 +3802,13 @@
                }
                memlock.sl_lock = 1;
 #endif /* XXXXXXXX */
-               if (dolock)
-                       uvm_vslock(p, SCARG(uap, old), savelen);
+               if (dolock) {
+                       /*
+                        * XXX Um, this is kind of evil.  What should
+                        * XXX we be passing here?
+                        */
+                       uvm_vslock(p, SCARG(uap, old), savelen, VM_PROT_NONE);
+               }
                oldlen = savelen;
        }
        error = (*fn)(name + 1, SCARG(uap, namelen) - 1, SCARG(uap, old),
diff -r 6691192502f8 -r e52070390799 sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c    Wed May 26 01:05:24 1999 +0000
+++ b/sys/kern/kern_sysctl.c    Wed May 26 01:07:06 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sysctl.c,v 1.44 1999/04/26 21:56:23 thorpej Exp $ */
+/*     $NetBSD: kern_sysctl.c,v 1.45 1999/05/26 01:07:06 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -162,8 +162,13 @@
                        memlock.sl_locked++;
                }
                memlock.sl_lock = 1;
-               if (dolock)
-                       uvm_vslock(p, SCARG(uap, old), oldlen);
+               if (dolock) {
+                       /*
+                        * XXX Um, this is kind of evil.  What should we
+                        * XXX be passing here?
+                        */
+                       uvm_vslock(p, SCARG(uap, old), oldlen, VM_PROT_NONE);
+               }
                savelen = oldlen;
        }
        error = (*fn)(name + 1, SCARG(uap, namelen) - 1, SCARG(uap, old),



Home | Main Index | Thread Index | Old Index