From 4c0474c8592752806fa8860d2d165beb641a72d3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 12 May 2020 13:34:41 +0200 Subject: [PATCH] 4.9-stable patches added patches: mm-page_alloc-fix-watchdog-soft-lockups-during-set_zone_contiguous.patch --- ...t-lockups-during-set_zone_contiguous.patch | 62 +++++++++++++++++++ queue-4.9/series | 1 + 2 files changed, 63 insertions(+) create mode 100644 queue-4.9/mm-page_alloc-fix-watchdog-soft-lockups-during-set_zone_contiguous.patch diff --git a/queue-4.9/mm-page_alloc-fix-watchdog-soft-lockups-during-set_zone_contiguous.patch b/queue-4.9/mm-page_alloc-fix-watchdog-soft-lockups-during-set_zone_contiguous.patch new file mode 100644 index 00000000000..a9a6dabc540 --- /dev/null +++ b/queue-4.9/mm-page_alloc-fix-watchdog-soft-lockups-during-set_zone_contiguous.patch @@ -0,0 +1,62 @@ +From e84fe99b68ce353c37ceeecc95dce9696c976556 Mon Sep 17 00:00:00 2001 +From: David Hildenbrand +Date: Thu, 7 May 2020 18:35:46 -0700 +Subject: mm/page_alloc: fix watchdog soft lockups during set_zone_contiguous() + +From: David Hildenbrand + +commit e84fe99b68ce353c37ceeecc95dce9696c976556 upstream. + +Without CONFIG_PREEMPT, it can happen that we get soft lockups detected, +e.g., while booting up. + + watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1] + CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-next-20200331+ #4 + Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 + RIP: __pageblock_pfn_to_page+0x134/0x1c0 + Call Trace: + set_zone_contiguous+0x56/0x70 + page_alloc_init_late+0x166/0x176 + kernel_init_freeable+0xfa/0x255 + kernel_init+0xa/0x106 + ret_from_fork+0x35/0x40 + +The issue becomes visible when having a lot of memory (e.g., 4TB) +assigned to a single NUMA node - a system that can easily be created +using QEMU. Inside VMs on a hypervisor with quite some memory +overcommit, this is fairly easy to trigger. + +Signed-off-by: David Hildenbrand +Signed-off-by: Andrew Morton +Reviewed-by: Pavel Tatashin +Reviewed-by: Pankaj Gupta +Reviewed-by: Baoquan He +Reviewed-by: Shile Zhang +Acked-by: Michal Hocko +Cc: Kirill Tkhai +Cc: Shile Zhang +Cc: Pavel Tatashin +Cc: Daniel Jordan +Cc: Michal Hocko +Cc: Alexander Duyck +Cc: Baoquan He +Cc: Oscar Salvador +Cc: +Link: http://lkml.kernel.org/r/20200416073417.5003-1-david@redhat.com +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/page_alloc.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -1408,6 +1408,7 @@ void set_zone_contiguous(struct zone *zo + if (!__pageblock_pfn_to_page(block_start_pfn, + block_end_pfn, zone)) + return; ++ cond_resched(); + } + + /* We confirm that there is no hole */ diff --git a/queue-4.9/series b/queue-4.9/series index c7c45c36c24..767801ebb9e 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -15,3 +15,4 @@ binfmt_elf-move-brk-out-of-mmap-when-doing-direct-loader-exec.patch usb-uas-add-quirk-for-lacie-2big-quadra.patch usb-serial-garmin_gps-add-sanity-checking-for-data-length.patch tracing-add-a-vmalloc_sync_mappings-for-safe-measure.patch +mm-page_alloc-fix-watchdog-soft-lockups-during-set_zone_contiguous.patch -- 2.47.3