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!
This commit is contained in:
parent
b2e9c635ec
commit
497248ca55
|
@ -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 @@ compat_netbsd32___sysctl(p, v, retval)
|
|||
}
|
||||
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),
|
||||
|
|
|
@ -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 @@ sys___sysctl(p, v, retval)
|
|||
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),
|
||||
|
|
Loading…
Reference in New Issue