Commit d860a0ad authored by John Rose's avatar John Rose Committed by Linus Torvalds

[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: default avatarJohn Rose <johnrose@austin.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 46d73aed
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment