lkml.org 
[lkml]   [2004]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] PCI insert_resource() nesting fix
From
Date
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.364 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site