diff options
Diffstat (limited to 'mm/sparse.c')
-rw-r--r-- | mm/sparse.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 7ca6dc847947..a37be5f9050d 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -615,11 +615,17 @@ static inline struct page *kmalloc_section_memmap(unsigned long pnum, int nid, | |||
615 | } | 615 | } |
616 | static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) | 616 | static void __kfree_section_memmap(struct page *memmap, unsigned long nr_pages) |
617 | { | 617 | { |
618 | vmemmap_free(memmap, nr_pages); | 618 | unsigned long start = (unsigned long)memmap; |
619 | unsigned long end = (unsigned long)(memmap + nr_pages); | ||
620 | |||
621 | vmemmap_free(start, end); | ||
619 | } | 622 | } |
620 | static void free_map_bootmem(struct page *memmap, unsigned long nr_pages) | 623 | static void free_map_bootmem(struct page *memmap, unsigned long nr_pages) |
621 | { | 624 | { |
622 | vmemmap_free(memmap, nr_pages); | 625 | unsigned long start = (unsigned long)memmap; |
626 | unsigned long end = (unsigned long)(memmap + nr_pages); | ||
627 | |||
628 | vmemmap_free(start, end); | ||
623 | } | 629 | } |
624 | #else | 630 | #else |
625 | static struct page *__kmalloc_section_memmap(unsigned long nr_pages) | 631 | static struct page *__kmalloc_section_memmap(unsigned long nr_pages) |