summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-04-21 17:46:53 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-04-21 17:46:53 +0000
commitc66cb234c74ab1a4c0c84ae13d23f6718bfcb5c7 (patch)
tree9c9de35914011b055b37f1fa8caa740c4045998d /sys
parent3f3df2e7884bcefd5338c81a452a4d0f308dbea2 (diff)
Correctly handle allocations of size 1 at an extent boundary; from NetBSD.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_extent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_extent.c b/sys/kern/subr_extent.c
index a426f85b5d4..875d8735384 100644
--- a/sys/kern/subr_extent.c
+++ b/sys/kern/subr_extent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_extent.c,v 1.27 2005/04/21 17:45:25 miod Exp $ */
+/* $OpenBSD: subr_extent.c,v 1.28 2005/04/21 17:46:52 miod Exp $ */
/* $NetBSD: subr_extent.c,v 1.7 1996/11/21 18:46:34 cgd Exp $ */
/*-
@@ -668,7 +668,7 @@ extent_alloc_subregion(ex, substart, subend, size, alignment, skew, boundary,
* If the region pasts the subend, bail out and see
* if we fit against the subend.
*/
- if (rp->er_start >= subend) {
+ if (rp->er_start > subend) {
exend = rp->er_start;
break;
}
@@ -905,7 +905,7 @@ extent_free(ex, start, size, flags)
/* Check arguments. */
if (ex == NULL)
panic("extent_free: NULL extent");
- if ((start < ex->ex_start) || (start > ex->ex_end)) {
+ if ((start < ex->ex_start) || (end > ex->ex_end)) {
extent_print(ex);
printf("extent_free: extent `%s', start 0x%lx, size 0x%lx\n",
ex->ex_name, start, size);