aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-06-23 16:58:19 -0700
committerAndrew Morton <akpm@linux-foundation.org>2023-06-23 16:58:19 -0700
commit63773d2b593d86440c3b96fd300ed80d00cd06ef (patch)
treeebc7b1e8f1c0ce535ef9c6120209d0e87d8d4b16 /mm/vmalloc.c
parentmm: page_alloc: make compound_page_dtors static (diff)
parentmm/mglru: make memcg_lru->lock irq safe (diff)
downloadwireguard-linux-63773d2b593d86440c3b96fd300ed80d00cd06ef.tar.xz
wireguard-linux-63773d2b593d86440c3b96fd300ed80d00cd06ef.zip
Merge mm-hotfixes-stable into mm-stable to pick up depended-upon changes.
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r--mm/vmalloc.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 5a3bf408251b..93cf99aba335 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -3148,11 +3148,20 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
* allocation request, free them via vfree() if any.
*/
if (area->nr_pages != nr_small_pages) {
- /* vm_area_alloc_pages() can also fail due to a fatal signal */
- if (!fatal_signal_pending(current))
+ /*
+ * vm_area_alloc_pages() can fail due to insufficient memory but
+ * also:-
+ *
+ * - a pending fatal signal
+ * - insufficient huge page-order pages
+ *
+ * Since we always retry allocations at order-0 in the huge page
+ * case a warning for either is spurious.
+ */
+ if (!fatal_signal_pending(current) && page_order == 0)
warn_alloc(gfp_mask, NULL,
- "vmalloc error: size %lu, page order %u, failed to allocate pages",
- area->nr_pages * PAGE_SIZE, page_order);
+ "vmalloc error: size %lu, failed to allocate pages",
+ area->nr_pages * PAGE_SIZE);
goto fail;
}