diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-10-25 18:46:36 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-10-25 18:46:36 +0000 |
commit | 6730df888ad4561e329567069574a75a9dd8cd06 (patch) | |
tree | 3583e717a3e0e2c49ce92f10aef04065559b185c /sys | |
parent | 84dc5b64b5992ac5e32779f19004329c7b52fc6e (diff) |
allow reading the direct mapped segment through the kmem
Diffstat (limited to 'sys')
-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; |