aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory_hotplug.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-10 10:02:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-10 10:02:49 +0100
commitcb05c6c82fb0853b53ecf983c29ab02aaca13194 (patch)
treee6316ab7e1625a550079803e8f80ab3f327448a9 /mm/memory_hotplug.c
parentd24e163af05c93e923aff76e01e6e30182cb38e3 (diff)
parent2c523b344dfa65a3738e7039832044aa133c75fb (diff)
downloadkernel_replicant_linux-cb05c6c82fb0853b53ecf983c29ab02aaca13194.tar.gz
kernel_replicant_linux-cb05c6c82fb0853b53ecf983c29ab02aaca13194.tar.bz2
kernel_replicant_linux-cb05c6c82fb0853b53ecf983c29ab02aaca13194.zip
Merge 5.6-rc5 into tty-next
We need the vt fixes in here and it resolves a merge issue with drivers/tty/vt/selection.c Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r--mm/memory_hotplug.c8
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