diff options
author | John Rose <johnrose@austin.ibm.com> | 2004-06-15 06:19:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-15 06:19:55 -0700 |
commit | d860a0ad215965ab03fe497889fe2e1a4ede3765 (patch) | |
tree | 9a40e0a4295aad30a698ca8d59125da0420e0405 /kernel | |
parent | 46d73aed122fd0113437bf25c6231de7119717be (diff) | |
download | history-d860a0ad215965ab03fe497889fe2e1a4ede3765.tar.gz |
[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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/resource.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index f7a704e88bd1be..da0ffd601fd709 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; |