diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-07 20:18:35 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-07 20:18:35 +0000 |
commit | 65fdafaf6345b5c76fe3c1f5bff0c2f14a42f946 (patch) | |
tree | 0d18dacfa318b06f30c489714a3eb8e1736e8ea4 /sys/arch | |
parent | 817e4ba987e0581da9ffe77776d27799ddeebff9 (diff) |
oops
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/dev/mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/hppa/dev/mem.c b/sys/arch/hppa/dev/mem.c index 3519b058b0a..7a5d3fa7b17 100644 --- a/sys/arch/hppa/dev/mem.c +++ b/sys/arch/hppa/dev/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.19 2003/04/07 17:24:08 mickey Exp $ */ +/* $OpenBSD: mem.c,v 1.20 2003/04/07 20:18:34 mickey Exp $ */ /* * Copyright (c) 1998-2002 Michael Shalayeff @@ -283,8 +283,8 @@ mmrw(dev, uio, flags) v = uio->uio_offset; o = v & PGOFSET; c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); - if (!uvm_kernacc((caddr_t)v, c, - (uio->uio_rw == UIO_READ) ? B_READ : B_WRITE)) { + if (btoc(v) > totalphysmem && !uvm_kernacc((caddr_t)v, + c, (uio->uio_rw == UIO_READ) ? B_READ : B_WRITE)) { error = EFAULT; /* this will break us out of the loop */ continue; |