summaryrefslogtreecommitdiff
path: root/sys/kern/subr_rman.c
diff options
context:
space:
mode:
authorMitsuru IWASAKI <iwasaki@FreeBSD.org>2002-08-29 12:39:21 +0000
committerMitsuru IWASAKI <iwasaki@FreeBSD.org>2002-08-29 12:39:21 +0000
commit3aea1e1405e636c7608de6bdd9131ac904ad1103 (patch)
treea557f1b29743da15bfceca3fb061b38d28acda5d /sys/kern/subr_rman.c
parent7c20f33742fb56502524138269e61e7b99761c1a (diff)
downloadsrc-test2-3aea1e1405e636c7608de6bdd9131ac904ad1103.tar.gz
src-test2-3aea1e1405e636c7608de6bdd9131ac904ad1103.zip
Notes
Diffstat (limited to 'sys/kern/subr_rman.c')
-rw-r--r--sys/kern/subr_rman.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c
index 85af088b86f9..7c5502edbfcb 100644
--- a/sys/kern/subr_rman.c
+++ b/sys/kern/subr_rman.c
@@ -232,6 +232,10 @@ rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end,
} while ((rstart & amask) != 0 && rstart < end &&
rstart < s->r_end);
rend = ulmin(s->r_end, ulmax(rstart + count, end));
+ if (rstart > rend) {
+ DPRINTF(("adjusted start exceeds end\n"));
+ continue;
+ }
DPRINTF(("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n",
rstart, rend, (rend - rstart + 1), count));