diff options
author | phk <phk@FreeBSD.org> | 1999-10-30 06:32:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-10-30 06:32:05 +0000 |
commit | 8d8f53dcdc1e1126b75d084478a6ff0d4664f39d (patch) | |
tree | 3c9df194f59066cf56f290cfea6886eefc551a5e /sys/kern/kern_sysctl.c | |
parent | ad79c6009cc16320a9a1ee513845cb84a567ec52 (diff) | |
download | FreeBSD-src-8d8f53dcdc1e1126b75d084478a6ff0d4664f39d.zip FreeBSD-src-8d8f53dcdc1e1126b75d084478a6ff0d4664f39d.tar.gz |
Change useracc() and kernacc() to use VM_PROT_{READ|WRITE|EXECUTE} for the
"rw" argument, rather than hijacking B_{READ|WRITE}.
Fix two bugs (physio & cam) resulting by the confusion caused by this.
Submitted by: Tor.Egge@fast.no
Reviewed by: alc, ken (partly)
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index af6c32a..a00d7a1 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -845,13 +845,13 @@ userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *old } if (old) { - if (!useracc(old, req.oldlen, B_WRITE)) + if (!useracc(old, req.oldlen, VM_PROT_WRITE)) return (EFAULT); req.oldptr= old; } if (newlen) { - if (!useracc(new, req.newlen, B_READ)) + if (!useracc(new, req.newlen, VM_PROT_READ)) return (EFAULT); req.newlen = newlen; req.newptr = new; |