* [PATCH] insert_resource fix
@ 2004-06-15 15:41 John Rose
0 siblings, 0 replies; only message in thread
From: John Rose @ 2004-06-15 15:41 UTC (permalink / raw)
To: torvalds; +Cc: greg, lkml, Mike Wortman
Hi Linus, Greg-
I sent this yesterday to lkml, but forgot to copy Linus and forgot to
sign off. And I used the wrong address for 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-15 15:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-15 15:41 [PATCH] insert_resource 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®