From 9467a93edbfba73f03b3f8847588c73b1e1d8335 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 1 May 2015 14:21:08 +1000 Subject: mm: page_alloc: pass PFN to __free_pages_bootmem fix Signed-off-by: Stephen Rothwell --- mm/bootmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/bootmem.c b/mm/bootmem.c index daf956bb4782..0a0eb62b1c92 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c @@ -173,6 +173,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) { struct page *page; unsigned long *map, start, end, pages, count = 0; + unsigned long cur; if (!bdata->node_bootmem_map) return 0; @@ -214,7 +215,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) count += BITS_PER_LONG; start += BITS_PER_LONG; } else { - unsigned long cur = start; + cur = start; start = ALIGN(start + 1, BITS_PER_LONG); while (vec && cur != start) { @@ -233,6 +234,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata) pages = bdata->node_low_pfn - bdata->node_min_pfn; pages = bootmem_bootmap_pages(pages); count += pages; + cur = bdata->node_min_pfn; while (pages--) __free_pages_bootmem(page++, cur++, 0); -- cgit v1.2.3