* [PATCH] PCI insert_resource() nesting fix
@ 2004-06-25 19:21 John Rose
0 siblings, 0 replies; only message in thread
From: John Rose @ 2004-06-25 19:21 UTC (permalink / raw)
To: lkml; +Cc: torvalds, greg
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>
Thanks-
John
Signed-off-by: John Rose <johnrose@austin.ibm.com>
diff -Nru a/kernel/resource.c b/kernel/resource.c
--- a/kernel/resource.c Mon Jun 14 15:42:29 2004
+++ b/kernel/resource.c Mon Jun 14 15:42:29 2004
@@ -332,8 +332,8 @@
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-25 19:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-25 19:21 [PATCH] PCI insert_resource() nesting fix John Rose
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®