diff -rubB kernel-source-3.1.orig/mm/page_alloc.c kernel-source-3.1/mm/page_alloc.c --- kernel-source-3.1.orig/mm/page_alloc.c 2011-10-24 10:10:05.000000000 +0300 +++ kernel-source-3.1/mm/page_alloc.c 2011-12-01 21:46:38.000000000 +0300 @@ -3371,8 +3371,16 @@ int reserve; /* Get the start pfn, end pfn and the number of blocks to reserve */ + /* + * Get the start pfn, end pfn and the number of blocks to reserve + * We have to be careful to be aligned to pageblock_nr_pages to + * make sure that we always check pfn_valid for the first page in + * the block. + */ + start_pfn = zone->zone_start_pfn; end_pfn = start_pfn + zone->spanned_pages; + start_pfn = roundup(start_pfn, pageblock_nr_pages); reserve = roundup(min_wmark_pages(zone), pageblock_nr_pages) >> pageblock_order;