Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Rose <johnrose@austin.ibm.com>2004-06-15 06:19:55 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-06-15 06:19:55 -0700
commitd860a0ad215965ab03fe497889fe2e1a4ede3765 (patch)
tree9a40e0a4295aad30a698ca8d59125da0420e0405
parent46d73aed122fd0113437bf25c6231de7119717be (diff)
[PATCH] insert_resource fix
I noticed that insert_resource() incorrectly handles the case of an existing parent resource with the same ending address as a newly added child. This results in incorrect nesting, like the following: # cat /proc/ioports <snip> 002f0000-002fffff : PCI Bus #48 00200000-002fffff : /pci@800000020000003 </snip> Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/resource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index f7a704e88bd1..da0ffd601fd7 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -332,8 +332,8 @@ int insert_resource(struct resource *parent, struct resource *new)
if (next->sibling->start > new->end)
break;
- /* existing resource overlaps end of new resource */
- if (next->end > new->end) {
+ /* existing resource includes new resource */
+ if (next->end >= new->end) {
parent = next;
result = 0;
goto begin;