diff options
author | 2002-10-25 18:46:35 +0000 | |
---|---|---|
committer | 2002-10-25 18:46:35 +0000 | |
commit | c897db0837a4de02fa40fe4af3ce9c82e056458c (patch) | |
tree | d1ba19594274d95cc96b1489f03346a437254e16 | |
parent | Remove PATH_NATRULES, since nat is no longer in a seperate file. (diff) | |
download | wireguard-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.c | 5 |
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; |