summaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorIngo Molnar2011-10-04 11:08:16 +0200
committerIngo Molnar2011-10-04 11:09:08 +0200
commit22f92bacbeea24b20e447444c28e7cad9f1ac3f8 (patch)
tree5c3f2346804a186aa2d954f078fd2f4d44bcc26e /kernel/resource.c
parentsched, tracing: Show PREEMPT_ACTIVE state in trace_sched_switch (diff)
parentMerge branch 'hwmon-for-linus' of git://github.com/groeck/linux (diff)
downloadkernel-qcow2-linux-22f92bacbeea24b20e447444c28e7cad9f1ac3f8.tar.gz
kernel-qcow2-linux-22f92bacbeea24b20e447444c28e7cad9f1ac3f8.tar.xz
kernel-qcow2-linux-22f92bacbeea24b20e447444c28e7cad9f1ac3f8.zip
Merge branch 'linus' into sched/core
Merge reason: pick up the latest fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 3b3cedc52592..c8dc249da5ce 100644
--- a/kernel/resource.c
+++ b/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;