summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1995-12-03 10:04:30 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1995-12-03 10:04:30 +0000
commit1b3d8d0ab1d88b340d1e1a28fcedadc2e394b868 (patch)
tree2185cfbbb1d22ce491b09d574e35dc9a3d8aeec0 /sys/arch
parent352e46b8c20951a6d03129d95fea8d99e81953a4 (diff)
Rearrange user page table size calculation so that silent overflow
cannot occur
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amiga/amiga/pmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/amiga/amiga/pmap.c b/sys/arch/amiga/amiga/pmap.c
index 145fc82e943..6f0249d433b 100644
--- a/sys/arch/amiga/amiga/pmap.c
+++ b/sys/arch/amiga/amiga/pmap.c
@@ -558,7 +558,8 @@ pmap_init(phys_start, phys_end)
* map where we want it.
*/
addr = AMIGA_UPTBASE;
- s = min(AMIGA_UPTMAXSIZE, maxproc * AMIGA_UPTSIZE);
+ s = AMIGA_UPTMAXSIZE / AMIGA_UPTSIZE < maxproc ?
+ AMIGA_UPTMAXSIZE : maxproc * AMIGA_UPTSIZE;
addr2 = addr + s;
rv = vm_map_find(kernel_map, NULL, 0, &addr, s, TRUE);
if (rv != KERN_SUCCESS)