From 5779c8e6f2381426979505dec7ab5fecf85a2691 Mon Sep 17 00:00:00 2001 From: imp Date: Sun, 23 Jan 2005 03:03:58 +0000 Subject: Protect against wrapping. This appaers to fix some hangs that people have seen in the isa pnp case where a resource buts up against 0xffffffff. This would only impact when the board was booted without ACPI. Submitted by: Ed Maste (freebsd-stable <20050103145720.GA90754@sandvine.com>) MFC After: 5 days --- sys/isa/isa_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/isa') diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 2ff3a6a..9948955 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -147,7 +147,7 @@ isa_find_memory(device_t child, struct isa_config *config, for (start = config->ic_mem[i].ir_start, end = config->ic_mem[i].ir_end, align = config->ic_mem[i].ir_align; - start + size - 1 <= end; + start + size - 1 <= end && start + size > start; start += align) { bus_set_resource(child, SYS_RES_MEMORY, i, start, size); -- cgit v1.1