Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33250
b: refs/heads/master
c: 58c1b5b
h: refs/heads/master
v: v3
  • Loading branch information
KAMEZAWA Hiroyuki authored and Linus Torvalds committed Aug 6, 2006
1 parent 8fa4f7c commit 32c9436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f04ab5efbca73ab366a156d96b073d2da35b158
refs/heads/master: 58c1b5b079071d82b2f924000b7e8fb5585ce7d8
3 changes: 2 additions & 1 deletion trunk/kernel/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ int find_next_system_ram(struct resource *res)

start = res->start;
end = res->end;
BUG_ON(start >= end);

read_lock(&resource_lock);
for (p = iomem_resource.child; p ; p = p->sibling) {
Expand All @@ -254,7 +255,7 @@ int find_next_system_ram(struct resource *res)
p = NULL;
break;
}
if (p->start >= start)
if ((p->end >= start) && (p->start < end))
break;
}
read_unlock(&resource_lock);
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages)
res.flags = IORESOURCE_MEM; /* we just need system ram */
section_end = res.end;

while (find_next_system_ram(&res) >= 0) {
while ((res.start < res.end) && (find_next_system_ram(&res) >= 0)) {
start_pfn = (unsigned long)(res.start >> PAGE_SHIFT);
nr_pages = (unsigned long)
((res.end + 1 - res.start) >> PAGE_SHIFT);
Expand Down

0 comments on commit 32c9436

Please sign in to comment.