diff --git a/[refs] b/[refs] index 4668caab0879..dfcac76d3238 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 92bb062fe36132a04c6dc8b3c51c945730b05224 +refs/heads/master: 47ea91b4052d9e94b9dca5d7a3d947fbebd07ba9 diff --git a/trunk/kernel/resource.c b/trunk/kernel/resource.c index 3b3cedc52592..c8dc249da5ce 100644 --- a/trunk/kernel/resource.c +++ b/trunk/kernel/resource.c @@ -419,6 +419,9 @@ static int __find_resource(struct resource *root, struct resource *old, else tmp.end = root->end; + if (tmp.end < tmp.start) + goto next; + resource_clip(&tmp, constraint->min, constraint->max); arch_remove_reservations(&tmp); @@ -436,8 +439,10 @@ static int __find_resource(struct resource *root, struct resource *old, return 0; } } - if (!this) + +next: if (!this || this->end == root->end) break; + if (this != old) tmp.start = this->end + 1; this = this->sibling;