summaryrefslogtreecommitdiff
path: root/sys/src/9/port/xalloc.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-08-07 21:11:11 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-08-07 21:11:11 +0200
commit0a101736b885578f673bc08b7fd040e977ede331 (patch)
tree09d97951f0dcb7a50af5b4603018ea7bb8a0064f /sys/src/9/port/xalloc.c
parentd304dc8119a737c65eca8717e1f436a1e0edf880 (diff)
pc, pc64: make pc kaddr() check reject -KZERO address (thanks aiju)
Diffstat (limited to 'sys/src/9/port/xalloc.c')
-rw-r--r--sys/src/9/port/xalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/port/xalloc.c b/sys/src/9/port/xalloc.c
index b677b252b..62afcac37 100644
--- a/sys/src/9/port/xalloc.c
+++ b/sys/src/9/port/xalloc.c
@@ -72,7 +72,7 @@ xinit(void)
/* first give to kernel */
if(n > 0){
m->kbase = (uintptr)KADDR(m->base);
- m->klimit = (uintptr)KADDR(m->base+size);
+ m->klimit = (uintptr)KADDR(m->base+size-1)+1;
xhole(m->base, size);
kpages -= n;
}