summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2002-10-25 18:46:35 +0000
committermickey <mickey@openbsd.org>2002-10-25 18:46:35 +0000
commitc897db0837a4de02fa40fe4af3ce9c82e056458c (patch)
treed1ba19594274d95cc96b1489f03346a437254e16
parentRemove PATH_NATRULES, since nat is no longer in a seperate file. (diff)
downloadwireguard-openbsd-c897db0837a4de02fa40fe4af3ce9c82e056458c.tar.xz
wireguard-openbsd-c897db0837a4de02fa40fe4af3ce9c82e056458c.zip
allow reading the direct mapped segment through the kmem
-rw-r--r--sys/arch/hppa/dev/mem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c
index a4af1cd7453..d9cb7717d77 100644
--- a/sys/arch/hppa/dev/mem.c
+++ b/sys/arch/hppa/dev/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.14 2002/09/05 21:36:28 mickey Exp $ */
+/* $OpenBSD: mem.c,v 1.15 2002/10/25 18:46:35 mickey Exp $ */
/*
* Copyright (c) 1998-2002 Michael Shalayeff
@@ -271,7 +271,8 @@ mmrw(dev, uio, flags)
o = v & PGOFSET;
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
rw = (uio->uio_rw == UIO_READ) ? B_READ : B_WRITE;
- if (!uvm_kernacc((caddr_t)v, c, rw)) {
+ if (btoc(v) > totalphysmem &&
+ !uvm_kernacc((caddr_t)v, c, rw)) {
error = EFAULT;
/* this will break us out of the loop */
continue;