[PATCH] Fix potential SPARSEMEM bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The first pfn of zones should be min_low_pfn, not 0.

Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
---
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index f08ae71..25abe91 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -377,7 +377,7 @@ void __init paging_init(void)
 #ifdef CONFIG_FLATMEM
 	free_area_init(zones_size);
 #else
-	pfn = 0;
+	pfn = min_low_pfn;
 	for (i = 0; i < MAX_NR_ZONES; i++)
 		for (j = 0; j < zones_size[i]; j++, pfn++)
 			if (!page_is_ram(pfn))


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux