aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index b81a367b9f39..ee3765760818 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1779,7 +1779,11 @@ void try_offline_node(int nid)
1779 for (i = 0; i < MAX_NR_ZONES; i++) { 1779 for (i = 0; i < MAX_NR_ZONES; i++) {
1780 struct zone *zone = pgdat->node_zones + i; 1780 struct zone *zone = pgdat->node_zones + i;
1781 1781
1782 if (zone->wait_table) 1782 /*
1783 * wait_table may be allocated from boot memory,
1784 * here only free if it's allocated by vmalloc.
1785 */
1786 if (is_vmalloc_addr(zone->wait_table))
1783 vfree(zone->wait_table); 1787 vfree(zone->wait_table);
1784 } 1788 }
1785 1789
@@ -1801,7 +1805,7 @@ int __ref remove_memory(int nid, u64 start, u64 size)
1801 int retry = 1; 1805 int retry = 1;
1802 1806
1803 start_pfn = PFN_DOWN(start); 1807 start_pfn = PFN_DOWN(start);
1804 end_pfn = start_pfn + PFN_DOWN(size); 1808 end_pfn = PFN_UP(start + size - 1);
1805 1809
1806 /* 1810 /*
1807 * When CONFIG_MEMCG is on, one memory block may be used by other 1811 * When CONFIG_MEMCG is on, one memory block may be used by other