diff options
| author | 2020-03-09 08:38:58 +0100 | |
|---|---|---|
| committer | 2020-03-09 08:38:58 +0100 | |
| commit | bb3a151dd42765acc8f469ff994de3ab31f15a95 (patch) | |
| tree | 87cd7da605aacb88aae36f4e69f255537e78e8fa /mm/memory_hotplug.c | |
| parent | Merge 5.6-rc3 into char-misc-next (diff) | |
| parent | Linux 5.6-rc5 (diff) | |
Merge 5.6-rc5 into char-misc-next
We need the binder and other fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
| -rw-r--r-- | mm/memory_hotplug.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 0a54ffac8c68..19389cdc16a5 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -574,7 +574,13 @@ EXPORT_SYMBOL_GPL(restore_online_page_callback); void generic_online_page(struct page *page, unsigned int order) { - kernel_map_pages(page, 1 << order, 1); + /* + * Freeing the page with debug_pagealloc enabled will try to unmap it, + * so we should map it first. This is better than introducing a special + * case in page freeing fast path. + */ + if (debug_pagealloc_enabled_static()) + kernel_map_pages(page, 1 << order, 1); __free_pages_core(page, order); totalram_pages_add(1UL << order); #ifdef CONFIG_HIGHMEM |
