Skip to contentSkip to conversation

fix WANT_PAGE_VIRTUAL in memmap_init

PATCH In review Bob Picco 2 participants 3 messages Jun 27, 2005

Subsystems (2)
lore
Share & tools
lore

Bob Picco

author
#0 lore raw

PATCH 1/1 fix WANT_PAGE_VIRTUAL in memmap_init

I spotted this issue while in memmap_init last week. I can't say the change has any test coverage by me. start_pfn was formerly used in main "for" loop. The fix is replace start_pfn with pfn.

bob

mm/page_alloc.c +1 -2
Index: linux-2.6.12-mm1/mm/page_alloc.c
===================================================================
@@ -1720,9 +1720,8 @@ void __init memmap_init_zone(unsigned lo
 #ifdef WANT_PAGE_VIRTUAL
 		/* The shift won't overflow because ZONE_NORMAL is below 4G. */
 		if (!is_highmem_idx(zone))
-			set_page_address(page, __va(start_pfn << PAGE_SHIFT));
+			set_page_address(page, __va(pfn << PAGE_SHIFT));
 #endif
-		start_pfn++;
 #ifdef CONFIG_PAGE_OWNER
 		page->order = -1;
 #endif

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 3 lines · Bob Picco

I spotted this issue while in memmap_init last week. I can't say the change has any test coverage by me. start_pfn was formerly used in main "for" loop. The fix is replace start_pfn with pfn.

Bob, this is rather serious. Could you push this to -STABLE after it goes to mainline (which hopefully is ASAP)?

Thanks.

-- wli
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
Quoted 3 lines · Bob Picco
Quoted 3 lines

I spotted this issue while in memmap_init last week. I can't say the change has any test coverage by me. start_pfn was formerly used in main "for" loop. The fix is replace start_pfn with pfn.

Quoted 2 lines · William Lee Irwin III

Bob, this is rather serious. Could you push this to -STABLE after it goes to mainline (which hopefully is ASAP)?

False alarm, it's just a redundant counter (it's not even 6AM here). Looks like someone took a dump all over this code recently. Brilliant.

-- wli
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>