summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-10-30 06:32:05 +0000
committerphk <phk@FreeBSD.org>1999-10-30 06:32:05 +0000
commit8d8f53dcdc1e1126b75d084478a6ff0d4664f39d (patch)
tree3c9df194f59066cf56f290cfea6886eefc551a5e /sys/pci/pci.c
parentad79c6009cc16320a9a1ee513845cb84a567ec52 (diff)
downloadFreeBSD-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/pci/pci.c')
-rw-r--r--sys/pci/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 9a756a8..2e6d548 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -663,7 +663,7 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
* Check the user's buffer to make sure it's readable.
*/
if (!useracc((caddr_t)cio->patterns,
- cio->pat_buf_len, B_READ)) {
+ cio->pat_buf_len, VM_PROT_READ)) {
printf("pci_ioctl: pattern buffer %p, "
"length %u isn't user accessible for"
" READ\n", cio->patterns,
@@ -699,7 +699,7 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
* Make sure we can write to the match buffer.
*/
if (!useracc((caddr_t)cio->matches,
- cio->match_buf_len, B_WRITE)) {
+ cio->match_buf_len, VM_PROT_WRITE)) {
printf("pci_ioctl: match buffer %p, length %u "
"isn't user accessible for WRITE\n",
cio->matches, cio->match_buf_len);
OpenPOWER on IntegriCloud